From db06207caec35052f4d105fedddff6fac9c8f26b Mon Sep 17 00:00:00 2001 From: Mirek Fidler Date: Sun, 1 Aug 2021 15:44:07 +0200 Subject: [PATCH] removed archive --- archive/OleCalc/OleCalc.upp | 32 - archive/OleCalc/calc.cpp | 76 - archive/OleCalc/calc.def | 7 - archive/OleCalc/calc.idl | 41 - archive/OleCalc/calc.lay | 7 - archive/OleCalc/calc.rc | 1 - archive/OleCalc/calc.tlb | 1 - archive/OleCalc/calc_idl.cpp | 179 - archive/OleCalc/calc_idl.h | 304 -- archive/OleCalc/calc_p.c | 889 ---- archive/OleCalc/dlldata.c | 38 - archive/PaintGL/Copying | 22 - archive/PaintGL/PaintGL.cpp | 98 - archive/PaintGL/PaintGL.h | 27 - archive/PaintGL/PaintGL.upp | 6 - archive/RichBook/RichBook.cpp | 677 --- archive/RichBook/RichBook.h | 134 - archive/RichBook/RichBook.t | 38 - archive/RichBook/RichBook.upp | 9 - archive/RichBook/RichBook_init.icpp | 8 - archive/uppsrc/AnalyzeMap/Analyze.cpp | 118 - archive/uppsrc/AnalyzeMap/AnalyzeMap.upp | 14 - archive/uppsrc/AnalyzeMap/Copying | 22 - archive/uppsrc/AnalyzeMap/crash.ico | Bin 974 -> 0 bytes archive/uppsrc/AnalyzeMap/crash.mak | 313 -- archive/uppsrc/AnalyzeMap/imagehlp.dli | 1 - archive/uppsrc/BuildAll/BuildAll.cpp | 125 - archive/uppsrc/BuildAll/BuildAll.upp | 11 - archive/uppsrc/CbGen/CbGen.upp | 13 - archive/uppsrc/CbGen/Copying | 22 - archive/uppsrc/CbGen/CppGen.cpp | 401 -- archive/uppsrc/Crash/Copying | 22 - archive/uppsrc/Crash/Crash.upp | 16 - archive/uppsrc/Crash/crash.cpp | 253 -- archive/uppsrc/Crash/crash.ico | Bin 974 -> 0 bytes archive/uppsrc/Crash/crash.iml | 14 - archive/uppsrc/Crash/crash.mak | 313 -- archive/uppsrc/Crash/crash.rc | 1 - archive/uppsrc/Crash/imagehlp.dli | 1 - archive/uppsrc/Crypto/BscF.cpp | 158 - archive/uppsrc/Crypto/Copying | 21 - archive/uppsrc/Crypto/Crypto.dsp | 104 - archive/uppsrc/Crypto/Crypto.h | 35 - archive/uppsrc/Crypto/Crypto.upp | 10 - archive/uppsrc/Crypto/Sha1.cpp | 176 - archive/uppsrc/Docedit/Copying | 22 - archive/uppsrc/Docedit/DocItem.cpp | 346 -- archive/uppsrc/Docedit/DocLink.cpp | 114 - archive/uppsrc/Docedit/Docbase.cpp | 66 - archive/uppsrc/Docedit/Docdir.cpp | 511 --- archive/uppsrc/Docedit/Docedit.cpp | 539 --- archive/uppsrc/Docedit/Docedit.h | 241 - archive/uppsrc/Docedit/Docedit.iml | 53 - archive/uppsrc/Docedit/Docedit.lay | 48 - archive/uppsrc/Docedit/Docedit.upp | 15 - archive/uppsrc/Ole/Copying | 22 - archive/uppsrc/Ole/Ctrl/Ctrl.upp | 17 - archive/uppsrc/Ole/Ctrl/OleCtrl.h | 829 ---- archive/uppsrc/Ole/Ctrl/control.cpp | 1209 ------ archive/uppsrc/Ole/Ctrl/ocx.def | 7 - archive/uppsrc/Ole/Ctrl/selftest.cpp | 25 - archive/uppsrc/Ole/Ctrl/util.cpp | 741 ---- archive/uppsrc/Ole/Ole.h | 27 - archive/uppsrc/Ole/Ole.upp | 14 - archive/uppsrc/Ole/srcdoc.tpp/all.i | 3 - archive/uppsrc/Ole/srcdoc.tpp/ocx_en-us.tpp | 50 - archive/uppsrc/Ole/util.cpp | 455 -- archive/uppsrc/Ole/util.h | 327 -- archive/uppsrc/OleDB/Copying | 22 - archive/uppsrc/OleDB/OleDB.cpp | 1559 ------- archive/uppsrc/OleDB/OleDB.h | 85 - archive/uppsrc/OleDB/OleDB.upp | 15 - archive/uppsrc/OleDB/OleDBSchema.h | 112 - archive/uppsrc/SqlCommander/Copying | 22 - archive/uppsrc/SqlCommander/SqlCommander.cpp | 201 - archive/uppsrc/SqlCommander/SqlCommander.h | 29 - archive/uppsrc/SqlCommander/SqlCommander.upp | 25 - archive/uppsrc/SqlCommander/StdAfx.cpp | 5 - archive/uppsrc/SqlCommander/login.lay | 15 - archive/uppsrc/TCore/Calc.upp | 12 - archive/uppsrc/TCore/CalcBasic.cpp | 1371 ------ archive/uppsrc/TCore/CalcBasic.h | 19 - archive/uppsrc/TCore/CalcBasic.hpp | 2185 ---------- archive/uppsrc/TCore/CalcNode.cpp | 1755 -------- archive/uppsrc/TCore/CalcNode.h | 727 ---- archive/uppsrc/TCore/CalcType.cpp | 88 - archive/uppsrc/TCore/CalcType.h | 174 - archive/uppsrc/TCore/Copying | 22 - archive/uppsrc/TCore/SqlConsole.cfg | Bin 1355 -> 0 bytes archive/uppsrc/TCore/TCore.h | 17 - archive/uppsrc/TCore/TCore.t | 283 -- archive/uppsrc/TCore/TCore.upp | 47 - archive/uppsrc/TCore/TCoreCalc.h | 24 - archive/uppsrc/TCore/TCoreDb.h | 8 - archive/uppsrc/TCore/TCore_init.icpp | 8 - .../TCore/appdoc.tpp/CalcArith_cs-cz.tpp | 180 - .../TCore/appdoc.tpp/CalcArith_en-us.tpp | 141 - .../TCore/appdoc.tpp/CalcArray_cs-cz.tpp | 145 - .../TCore/appdoc.tpp/CalcArray_en-us.tpp | 53 - .../TCore/appdoc.tpp/CalcDate_cs-cz.tpp | 144 - .../TCore/appdoc.tpp/CalcDate_en-us.tpp | 106 - .../uppsrc/TCore/appdoc.tpp/CalcLog_cs-cz.tpp | 96 - .../uppsrc/TCore/appdoc.tpp/CalcLog_en-us.tpp | 92 - .../TCore/appdoc.tpp/CalcNode_cs-cz.tpp | 109 - .../TCore/appdoc.tpp/CalcNode_en-us.tpp | 15 - .../uppsrc/TCore/appdoc.tpp/CalcSys_cs-cz.tpp | 62 - .../uppsrc/TCore/appdoc.tpp/CalcSys_en-us.tpp | 30 - .../TCore/appdoc.tpp/CalcText_cs-cz.tpp | 266 -- .../TCore/appdoc.tpp/CalcText_en-us.tpp | 144 - .../TCore/appdoc.tpp/CalcTrans_cs-cz.tpp | 76 - .../TCore/appdoc.tpp/CalcTrans_en-us.tpp | 83 - archive/uppsrc/TCore/appdoc.tpp/all.i | 63 - archive/uppsrc/TCore/atexit.cpp | 82 - archive/uppsrc/TCore/database.cpp | 2895 ------------- archive/uppsrc/TCore/database.h | 970 ----- archive/uppsrc/TCore/datafile.cpp | 1224 ------ archive/uppsrc/TCore/datafile.h | 226 - archive/uppsrc/TCore/datatest.cpp | 672 --- archive/uppsrc/TCore/dbf.h | 1 - archive/uppsrc/TCore/dd_cpp.h | 105 - archive/uppsrc/TCore/dd_h.h | 40 - .../doc.dpp/AppDoc_Calc$CabsN_CS-CZ15.dpx | 10 - .../TCore/doc.dpp/AppDoc_Calc$CabsN_EN-US.dpx | 11 - .../doc.dpp/AppDoc_Calc$CaddAA_CS-CZ15.dpx | 7 - .../doc.dpp/AppDoc_Calc$CaddAA_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CaddDN_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CaddDN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CaddND_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CaddND_EN-US.dpx | 19 - .../doc.dpp/AppDoc_Calc$CaddNN_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CaddNN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CaddSS_CS-CZ15.dpx | 8 - .../doc.dpp/AppDoc_Calc$CaddSS_EN-US.dpx | 4 - .../AppDoc_Calc$Cadd_monthsDN_CS-CZ15.dpx | 10 - .../AppDoc_Calc$Cadd_monthsDN_EN-US.dpx | 11 - .../AppDoc_Calc$Cadd_yearsDN_CS-CZ15.dpx | 10 - .../AppDoc_Calc$Cadd_yearsDN_EN-US.dpx | 11 - .../doc.dpp/AppDoc_Calc$CarccosN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CarccosN_EN-US.dpx | 14 - .../doc.dpp/AppDoc_Calc$CarcsinN_CS-CZ15.dpx | 12 - .../doc.dpp/AppDoc_Calc$CarcsinN_EN-US.dpx | 14 - .../doc.dpp/AppDoc_Calc$CarctgN_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CarctgN_EN-US.dpx | 12 - .../doc.dpp/AppDoc_Calc$CarrayCtr_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CarrayCtr_EN-US.dpx | 6 - .../AppDoc_Calc$CarrayIndex_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CarrayIndex_EN-US.dpx | 4 - .../AppDoc_Calc$CarrayRange_CS-CZ15.dpx | 7 - .../doc.dpp/AppDoc_Calc$CascS_CS-CZ15.dpx | 9 - .../TCore/doc.dpp/AppDoc_Calc$CascS_EN-US.dpx | 11 - .../doc.dpp/AppDoc_Calc$CavgA_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CbitAndNN_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CbitAndNN_EN-US.dpx | 10 - .../doc.dpp/AppDoc_Calc$CbitNotN_CS-CZ15.dpx | 12 - .../doc.dpp/AppDoc_Calc$CbitNotN_EN-US.dpx | 12 - .../doc.dpp/AppDoc_Calc$CbitOrNN_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CbitOrNN_EN-US.dpx | 10 - .../doc.dpp/AppDoc_Calc$CbitXorNN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CbitXorNN_EN-US.dpx | 11 - .../doc.dpp/AppDoc_Calc$CcallSV_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CcatSSS_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CcatSSS_EN-US.dpx | 11 - .../doc.dpp/AppDoc_Calc$CceilNN_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CceilNN_EN-US.dpx | 12 - .../doc.dpp/AppDoc_Calc$CceilN_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CceilN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CceilrNN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CceilrNN_EN-US.dpx | 13 - .../doc.dpp/AppDoc_Calc$CchrN_CS-CZ15.dpx | 9 - .../TCore/doc.dpp/AppDoc_Calc$CchrN_EN-US.dpx | 9 - .../doc.dpp/AppDoc_Calc$CcosN_CS-CZ15.dpx | 10 - .../TCore/doc.dpp/AppDoc_Calc$CcosN_EN-US.dpx | 12 - .../doc.dpp/AppDoc_Calc$CcountA_CS-CZ15.dpx | 8 - .../doc.dpp/AppDoc_Calc$CcountA_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CcountNS_CS-CZ15.dpx | 13 - .../doc.dpp/AppDoc_Calc$CcountNS_EN-US.dpx | 13 - .../doc.dpp/AppDoc_Calc$Cdate0_CS-CZ15.dpx | 6 - .../doc.dpp/AppDoc_Calc$Cdate0_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CdateNNN_CS-CZ15.dpx | 14 - .../doc.dpp/AppDoc_Calc$CdateNNN_EN-US.dpx | 16 - .../doc.dpp/AppDoc_Calc$CdateNN_CS-CZ15.dpx | 8 - .../doc.dpp/AppDoc_Calc$CdateNN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CdateN_CS-CZ15.dpx | 15 - .../doc.dpp/AppDoc_Calc$CdateN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CdayD_CS-CZ15.dpx | 9 - .../TCore/doc.dpp/AppDoc_Calc$CdayD_EN-US.dpx | 10 - .../AppDoc_Calc$Cday_of_weekD_CS-CZ15.dpx | 10 - .../AppDoc_Calc$Cday_of_weekD_EN-US.dpx | 11 - .../doc.dpp/AppDoc_Calc$CdivNN_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CdivNN_EN-US.dpx | 9 - .../TCore/doc.dpp/AppDoc_Calc$Ce0_CS-CZ15.dpx | 5 - .../TCore/doc.dpp/AppDoc_Calc$Ce0_EN-US.dpx | 5 - .../doc.dpp/AppDoc_Calc$CeqVV_CS-CZ15.dpx | 13 - .../TCore/doc.dpp/AppDoc_Calc$CeqVV_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CexpN_CS-CZ15.dpx | 10 - .../TCore/doc.dpp/AppDoc_Calc$CexpN_EN-US.dpx | 10 - ...pDoc_Calc$Cfirst_day_of_monthD_CS-CZ15.dpx | 9 - ...AppDoc_Calc$Cfirst_day_of_monthD_EN-US.dpx | 10 - .../doc.dpp/AppDoc_Calc$CfloorNN_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CfloorNN_EN-US.dpx | 12 - .../doc.dpp/AppDoc_Calc$CfloorN_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CfloorN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CfloorrNN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CfloorrNN_EN-US.dpx | 13 - .../doc.dpp/AppDoc_Calc$CftextNI_CS-CZ15.dpx | 5 - .../doc.dpp/AppDoc_Calc$CftextNI_EN-US.dpx | 5 - .../doc.dpp/AppDoc_Calc$CftextN_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CftextN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CgeNN_CS-CZ15.dpx | 7 - .../TCore/doc.dpp/AppDoc_Calc$CgeNN_EN-US.dpx | 6 - .../doc.dpp/AppDoc_Calc$CgeSS_CS-CZ15.dpx | 11 - .../TCore/doc.dpp/AppDoc_Calc$CgeSS_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CgeTT_CS-CZ15.dpx | 9 - .../TCore/doc.dpp/AppDoc_Calc$CgeTT_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CgtNN_CS-CZ15.dpx | 8 - .../TCore/doc.dpp/AppDoc_Calc$CgtNN_EN-US.dpx | 6 - .../doc.dpp/AppDoc_Calc$CgtSS_CS-CZ15.dpx | 10 - .../TCore/doc.dpp/AppDoc_Calc$CgtSS_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CgtTT_CS-CZ15.dpx | 10 - .../TCore/doc.dpp/AppDoc_Calc$CgtTT_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$ChourT_CS-CZ15.dpx | 6 - .../doc.dpp/AppDoc_Calc$ChourT_EN-US.dpx | 8 - .../doc.dpp/AppDoc_Calc$ChypotNN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$ChypotNN_EN-US.dpx | 12 - .../doc.dpp/AppDoc_Calc$Cis_dateV_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$Cis_dateV_EN-US.dpx | 12 - .../doc.dpp/AppDoc_Calc$Cis_nullV_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$Cis_nullV_EN-US.dpx | 11 - .../AppDoc_Calc$Cis_numberV_CS-CZ15.dpx | 12 - .../doc.dpp/AppDoc_Calc$Cis_numberV_EN-US.dpx | 11 - .../doc.dpp/AppDoc_Calc$Cis_textV_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$Cis_textV_EN-US.dpx | 11 - .../doc.dpp/AppDoc_Calc$Citext0NN_CS-CZ15.dpx | 15 - .../doc.dpp/AppDoc_Calc$CitextNN_CS-CZ15.dpx | 15 - .../doc.dpp/AppDoc_Calc$CitextN_CS-CZ15.dpx | 9 - ...ppDoc_Calc$Clast_day_of_monthD_CS-CZ15.dpx | 9 - .../AppDoc_Calc$Clast_day_of_monthD_EN-US.dpx | 10 - .../doc.dpp/AppDoc_Calc$CleNN_CS-CZ15.dpx | 9 - .../TCore/doc.dpp/AppDoc_Calc$CleNN_EN-US.dpx | 6 - .../doc.dpp/AppDoc_Calc$CleSS_CS-CZ15.dpx | 11 - .../TCore/doc.dpp/AppDoc_Calc$CleSS_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CleTT_CS-CZ15.dpx | 9 - .../TCore/doc.dpp/AppDoc_Calc$CleTT_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CleftAN_CS-CZ15.dpx | 12 - .../doc.dpp/AppDoc_Calc$CleftAN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CleftSN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CleftSN_EN-US.dpx | 13 - .../doc.dpp/AppDoc_Calc$ClenS_CS-CZ15.dpx | 9 - .../TCore/doc.dpp/AppDoc_Calc$ClenS_EN-US.dpx | 10 - .../doc.dpp/AppDoc_Calc$CllpadSNS_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CllpadSN_CS-CZ15.dpx | 12 - .../doc.dpp/AppDoc_Calc$ClnN_CS-CZ15.dpx | 10 - .../TCore/doc.dpp/AppDoc_Calc$ClnN_EN-US.dpx | 11 - .../doc.dpp/AppDoc_Calc$ClogN_CS-CZ15.dpx | 10 - .../TCore/doc.dpp/AppDoc_Calc$ClogN_EN-US.dpx | 11 - .../doc.dpp/AppDoc_Calc$ClogNotN_CS-CZ15.dpx | 13 - .../doc.dpp/AppDoc_Calc$ClogNotN_EN-US.dpx | 16 - .../doc.dpp/AppDoc_Calc$ClogNotS_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$ClogNotS_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$ClpadSNS_CS-CZ15.dpx | 12 - .../doc.dpp/AppDoc_Calc$ClpadSN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CltNN_CS-CZ15.dpx | 9 - .../TCore/doc.dpp/AppDoc_Calc$CltNN_EN-US.dpx | 6 - .../doc.dpp/AppDoc_Calc$CltSS_CS-CZ15.dpx | 10 - .../TCore/doc.dpp/AppDoc_Calc$CltSS_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CltTT_CS-CZ15.dpx | 9 - .../TCore/doc.dpp/AppDoc_Calc$CltTT_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CmaxA_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CmaxNN_CS-CZ15.dpx | 7 - .../doc.dpp/AppDoc_Calc$CmaxNN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CmaxSS_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CmaxSS_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CmaxTT_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CmaxTT_EN-US.dpx | 6 - .../doc.dpp/AppDoc_Calc$CmidANN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CmidANN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CmidAN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CmidAN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CmidSNN_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CmidSNN_EN-US.dpx | 16 - .../doc.dpp/AppDoc_Calc$CmidSN_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CmidSN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CminA_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CminNN_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CminNN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CminSS_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CminSS_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CminTT_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CminTT_EN-US.dpx | 7 - .../AppDoc_Calc$CminmaxNNN_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CminmaxNNN_EN-US.dpx | 4 - .../AppDoc_Calc$CminmaxSSS_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CminmaxSSS_EN-US.dpx | 4 - .../AppDoc_Calc$CminmaxTTT_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CminmaxTTT_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CminusN_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CminusN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CminuteT_CS-CZ15.dpx | 7 - .../doc.dpp/AppDoc_Calc$CminuteT_EN-US.dpx | 6 - .../doc.dpp/AppDoc_Calc$CmodNN_CS-CZ15.dpx | 13 - .../doc.dpp/AppDoc_Calc$CmodNN_EN-US.dpx | 13 - .../doc.dpp/AppDoc_Calc$CmonthD_CS-CZ15.dpx | 8 - .../doc.dpp/AppDoc_Calc$CmonthD_EN-US.dpx | 6 - .../doc.dpp/AppDoc_Calc$CmulAC_CS-CZ15.dpx | 13 - .../doc.dpp/AppDoc_Calc$CmulAC_EN-US.dpx | 8 - .../doc.dpp/AppDoc_Calc$CmulNN_CS-CZ15.dpx | 8 - .../doc.dpp/AppDoc_Calc$CmulNN_EN-US.dpx | 8 - .../doc.dpp/AppDoc_Calc$CmulNS_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CmulNS_EN-US.dpx | 12 - .../doc.dpp/AppDoc_Calc$CmulSN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CmulSN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CneVV_CS-CZ15.dpx | 19 - .../TCore/doc.dpp/AppDoc_Calc$CneVV_EN-US.dpx | 20 - .../doc.dpp/AppDoc_Calc$CnlsNN_CS-CZ15.dpx | 13 - .../doc.dpp/AppDoc_Calc$CnlsNN_EN-US.dpx | 14 - .../doc.dpp/AppDoc_Calc$CnlsN_CS-CZ15.dpx | 7 - .../TCore/doc.dpp/AppDoc_Calc$CnlsN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CnlsrNN_CS-CZ15.dpx | 13 - .../doc.dpp/AppDoc_Calc$CnlsrNN_EN-US.dpx | 17 - .../doc.dpp/AppDoc_Calc$CnlsrN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CnlsrN_EN-US.dpx | 13 - .../doc.dpp/AppDoc_Calc$Cnull0_CS-CZ15.dpx | 17 - .../doc.dpp/AppDoc_Calc$Cnull0_EN-US.dpx | 16 - .../doc.dpp/AppDoc_Calc$CnumberSN_CS-CZ15.dpx | 13 - .../doc.dpp/AppDoc_Calc$CnumberSN_EN-US.dpx | 13 - .../doc.dpp/AppDoc_Calc$CnumberS_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CnumberS_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CnvlVV_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CnvlVV_EN-US.dpx | 11 - .../doc.dpp/AppDoc_Calc$Cpi0_CS-CZ15.dpx | 9 - .../TCore/doc.dpp/AppDoc_Calc$Cpi0_EN-US.dpx | 6 - .../doc.dpp/AppDoc_Calc$CplusN_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CplusN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CpowNN_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CpowNN_EN-US.dpx | 12 - .../AppDoc_Calc$CreplaceSSS_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CrightAN_CS-CZ15.dpx | 12 - .../doc.dpp/AppDoc_Calc$CrightAN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CrightSN_CS-CZ15.dpx | 12 - .../doc.dpp/AppDoc_Calc$CrightSN_EN-US.dpx | 14 - .../doc.dpp/AppDoc_Calc$CroundNN_CS-CZ15.dpx | 13 - .../doc.dpp/AppDoc_Calc$CroundNN_EN-US.dpx | 13 - .../doc.dpp/AppDoc_Calc$CroundN_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CroundN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CroundrNN_CS-CZ15.dpx | 12 - .../doc.dpp/AppDoc_Calc$CroundrNN_EN-US.dpx | 14 - .../doc.dpp/AppDoc_Calc$CrpadSNS_CS-CZ15.dpx | 12 - .../doc.dpp/AppDoc_Calc$CrpadSN_CS-CZ15.dpx | 12 - .../doc.dpp/AppDoc_Calc$CrrpadSNS_CS-CZ15.dpx | 12 - .../doc.dpp/AppDoc_Calc$CrrpadSN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CsalNN_CS-CZ15.dpx | 13 - .../doc.dpp/AppDoc_Calc$CsalNN_EN-US.dpx | 14 - .../doc.dpp/AppDoc_Calc$CsarNN_CS-CZ15.dpx | 15 - .../doc.dpp/AppDoc_Calc$CsarNN_EN-US.dpx | 15 - .../doc.dpp/AppDoc_Calc$CsecondT_CS-CZ15.dpx | 8 - .../doc.dpp/AppDoc_Calc$CsecondT_EN-US.dpx | 6 - .../doc.dpp/AppDoc_Calc$CsgnN_CS-CZ15.dpx | 14 - .../TCore/doc.dpp/AppDoc_Calc$CsgnN_EN-US.dpx | 14 - .../doc.dpp/AppDoc_Calc$CsinN_CS-CZ15.dpx | 11 - .../TCore/doc.dpp/AppDoc_Calc$CsinN_EN-US.dpx | 12 - .../doc.dpp/AppDoc_Calc$CsqrN_CS-CZ15.dpx | 9 - .../TCore/doc.dpp/AppDoc_Calc$CsqrN_EN-US.dpx | 9 - .../doc.dpp/AppDoc_Calc$CsqrtN_CS-CZ15.dpx | 11 - .../doc.dpp/AppDoc_Calc$CsqrtN_EN-US.dpx | 7 - .../AppDoc_Calc$CstringIndex_CS-CZ15.dpx | 11 - .../AppDoc_Calc$CstringIndex_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CsubDD_CS-CZ15.dpx | 18 - .../doc.dpp/AppDoc_Calc$CsubDD_EN-US.dpx | 19 - .../doc.dpp/AppDoc_Calc$CsubDN_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CsubDN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CsubNN_CS-CZ15.dpx | 10 - .../doc.dpp/AppDoc_Calc$CsubNN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CsumASC_CS-CZ15.dpx | 17 - .../doc.dpp/AppDoc_Calc$CsumASC_EN-US.dpx | 13 - .../doc.dpp/AppDoc_Calc$CsumA_CS-CZ15.dpx | 11 - .../TCore/doc.dpp/AppDoc_Calc$CsumA_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CtextA_CS-CZ15.dpx | 8 - .../doc.dpp/AppDoc_Calc$CtextA_EN-US.dpx | 8 - .../doc.dpp/AppDoc_Calc$CtextD_CS-CZ15.dpx | 13 - .../doc.dpp/AppDoc_Calc$CtextD_EN-US.dpx | 14 - .../doc.dpp/AppDoc_Calc$CtextN_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CtextN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CtextS_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CtextS_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CtgN_CS-CZ15.dpx | 10 - .../TCore/doc.dpp/AppDoc_Calc$CtgN_EN-US.dpx | 11 - .../AppDoc_Calc$CtimeNNNNNN_CS-CZ15.dpx | 9 - .../doc.dpp/AppDoc_Calc$CyearD_CS-CZ15.dpx | 6 - .../doc.dpp/AppDoc_Calc$CyearD_EN-US.dpx | 6 - .../AppDoc_Calc$Cyears_betweenDD_CS-CZ15.dpx | 11 - .../AppDoc_Calc$Cyears_betweenDD_EN-US.dpx | 11 - .../TCore/doc.dpp/AppDoc_CalcNode_CS-CZ15.dpx | 128 - archive/uppsrc/TCore/globcfg.cpp | 139 - archive/uppsrc/TCore/globcfg.h | 106 - archive/uppsrc/TCore/help.cpp | 635 --- archive/uppsrc/TCore/help.h | 139 - archive/uppsrc/TCore/hxx.h | 6 - archive/uppsrc/TCore/iw.ico | Bin 1654 -> 0 bytes archive/uppsrc/TCore/new_fmt.hpp | 280 -- archive/uppsrc/TCore/new_lang.hpp | 206 - archive/uppsrc/TCore/nls_bw.h | 93 - archive/uppsrc/TCore/nls_bw.hpp | 857 ---- archive/uppsrc/TCore/service/service.cpp | 281 -- archive/uppsrc/TCore/service/service.h | 25 - archive/uppsrc/TCore/service/service.upp | 4 - archive/uppsrc/TCore/setop.h | 186 - archive/uppsrc/TCore/tcore.usc | 123 - archive/uppsrc/TCore/template.h | 585 --- archive/uppsrc/TCore/util.cpp | 1364 ------ archive/uppsrc/TCore/util.h | 295 -- archive/uppsrc/TCore/xml.cpp | 99 - archive/uppsrc/TCore/xml.h | 102 - archive/uppsrc/TCore/xmlparse.cpp | 484 --- archive/uppsrc/TCore/xmlparse.h | 201 - archive/uppsrc/TCtrlLib/Calc/Calc.upp | 13 - archive/uppsrc/TCtrlLib/Calc/CalcGuiType.cpp | 77 - archive/uppsrc/TCtrlLib/Calc/CalcGuiType.h | 15 - archive/uppsrc/TCtrlLib/Calc/CalcGuiType.hpp | 232 - archive/uppsrc/TCtrlLib/Calc/CalcHelp.cpp | 325 -- archive/uppsrc/TCtrlLib/Calc/DlgCalc.cpp | 89 - archive/uppsrc/TCtrlLib/Calc/DlgCalc.lay | 17 - archive/uppsrc/TCtrlLib/Calc/TCtrlLibCalc.h | 23 - archive/uppsrc/TCtrlLib/Calc/TCtrlLibCalc.t | 58 - .../TCtrlLib/Calc/TCtrlLibCalc_init.icpp | 8 - .../doc.dpp/AppDoc_Calc$CbottomR_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CbottomR_EN-US.dpx | 4 - .../AppDoc_Calc$CbottomcenterR_CS-CZ15.dpx | 4 - .../AppDoc_Calc$CbottomcenterR_EN-US.dpx | 4 - .../AppDoc_Calc$CbottomleftR_CS-CZ15.dpx | 4 - .../AppDoc_Calc$CbottomleftR_EN-US.dpx | 4 - .../AppDoc_Calc$CbottomrightR_CS-CZ15.dpx | 4 - .../AppDoc_Calc$CbottomrightR_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CcenterR_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CcenterR_EN-US.dpx | 4 - .../AppDoc_Calc$CcenterleftR_CS-CZ15.dpx | 4 - .../AppDoc_Calc$CcenterleftR_EN-US.dpx | 4 - .../AppDoc_Calc$CcenterrightR_CS-CZ15.dpx | 4 - .../AppDoc_Calc$CcenterrightR_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CheightR_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CheightR_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CleftR_CS-CZ15.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CleftR_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CpointNN_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CpointNN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CrectNNNN_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CrectNNNN_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CrectPP_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CrectPP_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CrectP_CS-CZ15.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CrectP_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CrightR_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CrightR_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CtextP_CS-CZ15.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CtextP_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CtextR_CS-CZ15.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CtextR_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CtopR_CS-CZ15.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CtopR_EN-US.dpx | 4 - .../AppDoc_Calc$CtopcenterR_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CtopcenterR_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CtopleftR_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CtopleftR_EN-US.dpx | 4 - .../AppDoc_Calc$CtoprightR_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CtoprightR_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CwidthR_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CwidthR_EN-US.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CxP_CS-CZ15.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CxP_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CxcenterR_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CxcenterR_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CxmaxR_CS-CZ15.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CxmaxR_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CxminR_CS-CZ15.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CxminR_EN-US.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CyP_CS-CZ15.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CyP_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CycenterR_CS-CZ15.dpx | 4 - .../doc.dpp/AppDoc_Calc$CycenterR_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CymaxR_CS-CZ15.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CymaxR_EN-US.dpx | 4 - .../doc.dpp/AppDoc_Calc$CyminR_CS-CZ15.dpx | 4 - .../Calc/doc.dpp/AppDoc_Calc$CyminR_EN-US.dpx | 4 - .../Calc/doc.dpp/AppDoc_DlgCalc_CS-CZ15.dpx | 118 - archive/uppsrc/TCtrlLib/Calc/doc.dpp/links | 0 archive/uppsrc/TCtrlLib/Copying | 22 - archive/uppsrc/TCtrlLib/CtrlArray.cpp | 339 -- archive/uppsrc/TCtrlLib/CtrlArray.h | 122 - archive/uppsrc/TCtrlLib/DocMgr.cpp | 1443 ------ archive/uppsrc/TCtrlLib/DocMgr.h | 397 -- archive/uppsrc/TCtrlLib/DocMgr.iml | 37 - archive/uppsrc/TCtrlLib/DocMgr.lay | 20 - archive/uppsrc/TCtrlLib/DocMgr.lng | 125 - archive/uppsrc/TCtrlLib/Help/DlgFormula.cpp | 214 - archive/uppsrc/TCtrlLib/Help/DlgFormula.hpp | 25 - archive/uppsrc/TCtrlLib/Help/DlgFormula.lay | 14 - archive/uppsrc/TCtrlLib/Help/DlgHelp.cpp | 1764 -------- archive/uppsrc/TCtrlLib/Help/DlgHelp.hpp | 0 archive/uppsrc/TCtrlLib/Help/DlgHelp.lay | 111 - archive/uppsrc/TCtrlLib/Help/DlgHelp.lng | 216 - archive/uppsrc/TCtrlLib/Help/DlgHelpEdit.cpp | 1245 ------ archive/uppsrc/TCtrlLib/Help/DlgHelpEdit.lay | 59 - archive/uppsrc/TCtrlLib/Help/DlgHelpEdit.lng | 49 - archive/uppsrc/TCtrlLib/Help/DlgHelpView.cpp | 811 ---- archive/uppsrc/TCtrlLib/Help/DlgHelpView.hpp | 0 archive/uppsrc/TCtrlLib/Help/DlgHelpView.iml | 26 - archive/uppsrc/TCtrlLib/Help/DlgHelpView.lay | 24 - archive/uppsrc/TCtrlLib/Help/DlgHelpView.lng | 37 - archive/uppsrc/TCtrlLib/Help/DlgShot.cpp | 451 -- archive/uppsrc/TCtrlLib/Help/DlgShot.lay | 67 - archive/uppsrc/TCtrlLib/Help/Help.upp | 33 - archive/uppsrc/TCtrlLib/Help/TCtrlLibHelp.h | 42 - .../doc.dpp/AppDoc_DlgFormula_CS-CZ15.dpx | 13 - .../AppDoc_sys_book_expand_CS-CZ15.dpx | 2 - archive/uppsrc/TCtrlLib/Help/helpgen.cpp | 235 - archive/uppsrc/TCtrlLib/Help/helputil.cpp | 1914 -------- archive/uppsrc/TCtrlLib/Help/helputil.h | 129 - archive/uppsrc/TCtrlLib/Help/notes.txt | 29 - archive/uppsrc/TCtrlLib/Help/richform.cpp | 122 - archive/uppsrc/TCtrlLib/OldTreeCtrl.cpp | 1469 ------- archive/uppsrc/TCtrlLib/OldTreeCtrl.h | 467 -- archive/uppsrc/TCtrlLib/OldTreeCtrl.iml | 10 - archive/uppsrc/TCtrlLib/OldTreeCtrl.lng | 23 - archive/uppsrc/TCtrlLib/Ruler.cpp | 371 -- archive/uppsrc/TCtrlLib/Ruler.h | 115 - archive/uppsrc/TCtrlLib/TCtrlImg.cpp | 11 - archive/uppsrc/TCtrlLib/TCtrlImg.h | 12 - archive/uppsrc/TCtrlLib/TCtrlLib.h | 14 - archive/uppsrc/TCtrlLib/TCtrlLib.t | 407 -- archive/uppsrc/TCtrlLib/TCtrlLib.upp | 60 - archive/uppsrc/TCtrlLib/TCtrlLib.usc | 28 - archive/uppsrc/TCtrlLib/TCtrlLib_init.icpp | 8 - archive/uppsrc/TCtrlLib/TreeCtrlImg.h | 8 - .../TCtrlLib/appdoc.tpp/CalcGuiType_cs-cz.tpp | 79 - .../TCtrlLib/appdoc.tpp/CalcGuiType_en-us.tpp | 79 - .../TCtrlLib/appdoc.tpp/DlgCalc_cs-cz.tpp | 35 - archive/uppsrc/TCtrlLib/appdoc.tpp/all.i | 11 - archive/uppsrc/TCtrlLib/tctrllib.iml | 25 - archive/uppsrc/TCtrlLib/template.h | 287 -- archive/uppsrc/TCtrlLib/util.cpp | 835 ---- archive/uppsrc/TCtrlLib/util.h | 556 --- archive/uppsrc/TDraw/Copying | 22 - archive/uppsrc/TDraw/TDraw.h | 10 - archive/uppsrc/TDraw/TDraw.upp | 18 - archive/uppsrc/TDraw/formula.cpp | 1419 ------ archive/uppsrc/TDraw/formula.h | 267 -- archive/uppsrc/TDraw/util.cpp | 1483 ------- archive/uppsrc/TDraw/util.h | 197 - archive/uppsrc/TServ/Copying | 21 - archive/uppsrc/TServ/Makefile | 2616 ----------- archive/uppsrc/TServ/Makefile.solaris | 2046 --------- archive/uppsrc/TServ/Makefile.ubuntu | 3470 --------------- archive/uppsrc/TServ/TServ.sh | 130 - archive/uppsrc/TServ/TServ.upp | 22 - archive/uppsrc/TServ/err | 869 ---- archive/uppsrc/TServ/tserv.cpp | 843 ---- archive/uppsrc/TServ/version.h | 3 - archive/uppsrc/TSql/Copying | 22 - archive/uppsrc/TSql/Ctrl/Ctrl.upp | 15 - archive/uppsrc/TSql/Ctrl/DlgLogin.cpp | 276 -- archive/uppsrc/TSql/Ctrl/DlgLogin.h | 50 - archive/uppsrc/TSql/Ctrl/DlgLogin.hpp | 293 -- archive/uppsrc/TSql/Ctrl/DlgLogin.lay | 34 - archive/uppsrc/TSql/Ctrl/DlgLogin.lng | 39 - archive/uppsrc/TSql/Ctrl/TSqlCtrl.h | 9 - archive/uppsrc/TSql/Ctrl/TSqlCtrl.icpp | 9 - archive/uppsrc/TSql/Ctrl/TSqlCtrl.t | 69 - .../AppDoc_DlgLoginSetPass_CS-CZ15.dpx | 73 - .../Ctrl/doc.dpp/AppDoc_DlgLogin_CS-CZ15.dpx | 53 - archive/uppsrc/TSql/Ctrl/doc.dpp/links | 0 archive/uppsrc/TSql/TSql.h | 18 - archive/uppsrc/TSql/TSql.t | 19 - archive/uppsrc/TSql/TSql.upp | 19 - archive/uppsrc/TSql/TSql_init.icpp | 8 - archive/uppsrc/TSql/dict.cpp | 531 --- archive/uppsrc/TSql/dict.h | 230 - archive/uppsrc/TSql/id.h | 33 - archive/uppsrc/TSql/template.h | 164 - archive/uppsrc/TSql/util.cpp | 817 ---- archive/uppsrc/TSql/util.h | 143 - archive/uppsrc/Updater/Copying | 22 - archive/uppsrc/Updater/Resource.h | 18 - archive/uppsrc/Updater/Updater.cpp | 23 - archive/uppsrc/Updater/Updater.h | 22 - archive/uppsrc/Updater/Updater.ico | Bin 1078 -> 0 bytes archive/uppsrc/Updater/Updater.rc | 1 - archive/uppsrc/Updater/Updater.upp | 14 - archive/uppsrc/Web/Copying | 22 - archive/uppsrc/Web/SSL/Copying | 22 - archive/uppsrc/Web/SSL/SSL.h | 1 - archive/uppsrc/Web/SSL/SSL.upp | 47 - archive/uppsrc/Web/SSL/WebSSL.h | 197 - archive/uppsrc/Web/SSL/httpscli.cpp | 128 - .../uppsrc/Web/SSL/src.tpp/index_en-us.tpp | 3 - .../uppsrc/Web/SSL/srcdoc.tpp/index_en-us.tpp | 3 - .../uppsrc/Web/SSL/srcimp.tpp/index_en-us.tpp | 3 - archive/uppsrc/Web/SSL/util.cpp | 605 --- archive/uppsrc/Web/ScgiServer.cpp | 93 - archive/uppsrc/Web/ScgiServer.h | 34 - archive/uppsrc/Web/Web.h | 39 - archive/uppsrc/Web/Web.t | 1053 ----- archive/uppsrc/Web/Web.upp | 40 - archive/uppsrc/Web/Web_init.icpp | 8 - archive/uppsrc/Web/auth.cpp | 289 -- archive/uppsrc/Web/auth.h | 30 - archive/uppsrc/Web/ctrl/Copying | 22 - archive/uppsrc/Web/ctrl/DlgHttpServer.cpp | 383 -- archive/uppsrc/Web/ctrl/DlgHttpServer.h | 35 - archive/uppsrc/Web/ctrl/DlgHttpServer.lay | 16 - archive/uppsrc/Web/ctrl/DlgHttpServer.lng | 19 - archive/uppsrc/Web/ctrl/WebCtrl.h | 9 - archive/uppsrc/Web/ctrl/WebImg.h | 3 - archive/uppsrc/Web/ctrl/ctrl.upp | 18 - archive/uppsrc/Web/ctrl/web.iml | 28 - archive/uppsrc/Web/html.cpp | 615 --- archive/uppsrc/Web/html.h | 300 -- archive/uppsrc/Web/httpcli.cpp | 637 --- archive/uppsrc/Web/httpcli.h | 166 - archive/uppsrc/Web/httpcli_old.cpp | 421 -- archive/uppsrc/Web/httpsrv.cpp | 990 ----- archive/uppsrc/Web/httpsrv.h | 187 - archive/uppsrc/Web/md5.cpp | 12 - archive/uppsrc/Web/smtp.cpp | 442 -- archive/uppsrc/Web/smtp.h | 73 - archive/uppsrc/Web/socket.cpp | 888 ---- archive/uppsrc/Web/socket.h | 171 - archive/uppsrc/Web/sproc.cpp | 634 --- archive/uppsrc/Web/sproc.h | 21 - .../Web/srcdoc.tpp/AboutUppSockets_en-us.tpp | 9 - .../srcdoc.tpp/ConnectionOriented_en-us.tpp | 77 - .../Web/srcdoc.tpp/MiscSocketInfo_en-us.tpp | 12 - .../Web/srcdoc.tpp/SocketExample1_en-us.tpp | 10 - .../Web/srcdoc.tpp/SocketPitfalls_en-us.tpp | 12 - archive/uppsrc/Web/srcdoc.tpp/index_en-us.tpp | 6 - archive/uppsrc/Web/srcimp.tpp/index_en-us.tpp | 3 - archive/uppsrc/Web/util.cpp | 764 ---- archive/uppsrc/Web/util.h | 290 -- archive/uppsrc/Web/wisapi/Copying | 22 - archive/uppsrc/Web/wisapi/version.h | 3 - archive/uppsrc/Web/wisapi/wisapi.cpp | 1419 ------ archive/uppsrc/Web/wisapi/wisapi.def | 5 - archive/uppsrc/Web/wisapi/wisapi.lng | 156 - archive/uppsrc/Web/wisapi/wisapi.t | 198 - archive/uppsrc/Web/wisapi/wisapi.upp | 24 - archive/uppsrc/Web/wisapi/wisapicfg.cpp | 544 --- archive/uppsrc/Web/wisapi/wisapicfg.h | 51 - archive/uppsrc/coff/Copying | 22 - archive/uppsrc/coff/binobj/Copying | 22 - archive/uppsrc/coff/binobj/binobj.cpp | 505 --- archive/uppsrc/coff/binobj/binobj.h | 47 - archive/uppsrc/coff/binobj/binobj.upp | 14 - archive/uppsrc/coff/coff.cpp | 6 - archive/uppsrc/coff/coff.h | 22 - archive/uppsrc/coff/coff.upp | 19 - archive/uppsrc/coff/defs.cpp | 70 - archive/uppsrc/coff/defs.h | 781 ---- archive/uppsrc/coff/imagehlp.dli | 1 - archive/uppsrc/coff/lib.cpp | 340 -- archive/uppsrc/coff/lib.h | 88 - archive/uppsrc/coff/stab.def | 268 -- archive/uppsrc/coff/uar/Copying | 22 - archive/uppsrc/coff/uar/lib.cpp | 267 -- archive/uppsrc/coff/uar/lib.h | 38 - archive/uppsrc/coff/uar/main.cpp | 91 - archive/uppsrc/coff/uar/uar.h | 8 - archive/uppsrc/coff/uar/uar.upp | 22 - archive/uppsrc/coff/uar/version.h | 10 - archive/uppsrc/coff/uld/Copying | 22 - archive/uppsrc/coff/uld/diff | 128 - archive/uppsrc/coff/uld/dump.cpp | 231 - archive/uppsrc/coff/uld/linkjob.cpp | 3858 ----------------- archive/uppsrc/coff/uld/main.cpp | 118 - archive/uppsrc/coff/uld/notes.txt | 16 - archive/uppsrc/coff/uld/obj.h | 564 --- archive/uppsrc/coff/uld/object.cpp | 396 -- archive/uppsrc/coff/uld/uld.h | 14 - archive/uppsrc/coff/uld/uld.upp | 30 - archive/uppsrc/coff/uld/version.h | 10 - archive/uppsrc/coff/util.cpp | 698 --- archive/uppsrc/coff/util.h | 36 - archive/uppsrc/docpp/Copying | 22 - archive/uppsrc/docpp/Parser.cpp | 825 ---- archive/uppsrc/docpp/Pre.cpp | 95 - archive/uppsrc/docpp/cpplex.cpp | 324 -- archive/uppsrc/docpp/docpp.h | 250 -- archive/uppsrc/docpp/docpp.upp | 12 - archive/uppsrc/docpp/keyword.i | 80 - archive/uppsrc/plugin/wincert/pdf.cpp | 363 -- archive/uppsrc/plugin/wincert/util.cpp | 163 - archive/uppsrc/plugin/wincert/wincert.h | 34 - archive/uppsrc/plugin/wincert/wincert.upp | 13 - archive/uppsrc/rw/Alias.cpp | 174 - archive/uppsrc/rw/Copying | 21 - archive/uppsrc/rw/Designer.cpp | 1217 ------ archive/uppsrc/rw/Designer.h | 401 -- archive/uppsrc/rw/Designer.lay | 46 - archive/uppsrc/rw/DesignerFile.cpp | 421 -- archive/uppsrc/rw/DesignerLayt.cpp | 106 - archive/uppsrc/rw/DesignerWin.cpp | 374 -- archive/uppsrc/rw/ItemCtrl.cpp | 295 -- archive/uppsrc/rw/Lang.cpp | 117 - archive/uppsrc/rw/StdCtrls.cpp | 1 - archive/uppsrc/rw/Util.cpp | 61 - .../doc.dpp/AppDoc_RW_NewFeatures_EN-US.dpp | 23 - archive/uppsrc/rw/doc.dpp/links | 0 archive/uppsrc/rw/iderw.h | 4 - archive/uppsrc/rw/rw.ico | Bin 1078 -> 0 bytes archive/uppsrc/rw/rw.iml | 497 --- archive/uppsrc/rw/rw.rc | 1 - archive/uppsrc/rw/rw.upp | 27 - 709 files changed, 95973 deletions(-) delete mode 100644 archive/OleCalc/OleCalc.upp delete mode 100644 archive/OleCalc/calc.cpp delete mode 100644 archive/OleCalc/calc.def delete mode 100644 archive/OleCalc/calc.idl delete mode 100644 archive/OleCalc/calc.lay delete mode 100644 archive/OleCalc/calc.rc delete mode 100644 archive/OleCalc/calc.tlb delete mode 100644 archive/OleCalc/calc_idl.cpp delete mode 100644 archive/OleCalc/calc_idl.h delete mode 100644 archive/OleCalc/calc_p.c delete mode 100644 archive/OleCalc/dlldata.c delete mode 100644 archive/PaintGL/Copying delete mode 100644 archive/PaintGL/PaintGL.cpp delete mode 100644 archive/PaintGL/PaintGL.h delete mode 100644 archive/PaintGL/PaintGL.upp delete mode 100644 archive/RichBook/RichBook.cpp delete mode 100644 archive/RichBook/RichBook.h delete mode 100644 archive/RichBook/RichBook.t delete mode 100644 archive/RichBook/RichBook.upp delete mode 100644 archive/RichBook/RichBook_init.icpp delete mode 100644 archive/uppsrc/AnalyzeMap/Analyze.cpp delete mode 100644 archive/uppsrc/AnalyzeMap/AnalyzeMap.upp delete mode 100644 archive/uppsrc/AnalyzeMap/Copying delete mode 100644 archive/uppsrc/AnalyzeMap/crash.ico delete mode 100644 archive/uppsrc/AnalyzeMap/crash.mak delete mode 100644 archive/uppsrc/AnalyzeMap/imagehlp.dli delete mode 100644 archive/uppsrc/BuildAll/BuildAll.cpp delete mode 100644 archive/uppsrc/BuildAll/BuildAll.upp delete mode 100644 archive/uppsrc/CbGen/CbGen.upp delete mode 100644 archive/uppsrc/CbGen/Copying delete mode 100644 archive/uppsrc/CbGen/CppGen.cpp delete mode 100644 archive/uppsrc/Crash/Copying delete mode 100644 archive/uppsrc/Crash/Crash.upp delete mode 100644 archive/uppsrc/Crash/crash.cpp delete mode 100644 archive/uppsrc/Crash/crash.ico delete mode 100644 archive/uppsrc/Crash/crash.iml delete mode 100644 archive/uppsrc/Crash/crash.mak delete mode 100644 archive/uppsrc/Crash/crash.rc delete mode 100644 archive/uppsrc/Crash/imagehlp.dli delete mode 100644 archive/uppsrc/Crypto/BscF.cpp delete mode 100644 archive/uppsrc/Crypto/Copying delete mode 100644 archive/uppsrc/Crypto/Crypto.dsp delete mode 100644 archive/uppsrc/Crypto/Crypto.h delete mode 100644 archive/uppsrc/Crypto/Crypto.upp delete mode 100644 archive/uppsrc/Crypto/Sha1.cpp delete mode 100644 archive/uppsrc/Docedit/Copying delete mode 100644 archive/uppsrc/Docedit/DocItem.cpp delete mode 100644 archive/uppsrc/Docedit/DocLink.cpp delete mode 100644 archive/uppsrc/Docedit/Docbase.cpp delete mode 100644 archive/uppsrc/Docedit/Docdir.cpp delete mode 100644 archive/uppsrc/Docedit/Docedit.cpp delete mode 100644 archive/uppsrc/Docedit/Docedit.h delete mode 100644 archive/uppsrc/Docedit/Docedit.iml delete mode 100644 archive/uppsrc/Docedit/Docedit.lay delete mode 100644 archive/uppsrc/Docedit/Docedit.upp delete mode 100644 archive/uppsrc/Ole/Copying delete mode 100644 archive/uppsrc/Ole/Ctrl/Ctrl.upp delete mode 100644 archive/uppsrc/Ole/Ctrl/OleCtrl.h delete mode 100644 archive/uppsrc/Ole/Ctrl/control.cpp delete mode 100644 archive/uppsrc/Ole/Ctrl/ocx.def delete mode 100644 archive/uppsrc/Ole/Ctrl/selftest.cpp delete mode 100644 archive/uppsrc/Ole/Ctrl/util.cpp delete mode 100644 archive/uppsrc/Ole/Ole.h delete mode 100644 archive/uppsrc/Ole/Ole.upp delete mode 100644 archive/uppsrc/Ole/srcdoc.tpp/all.i delete mode 100644 archive/uppsrc/Ole/srcdoc.tpp/ocx_en-us.tpp delete mode 100644 archive/uppsrc/Ole/util.cpp delete mode 100644 archive/uppsrc/Ole/util.h delete mode 100644 archive/uppsrc/OleDB/Copying delete mode 100644 archive/uppsrc/OleDB/OleDB.cpp delete mode 100644 archive/uppsrc/OleDB/OleDB.h delete mode 100644 archive/uppsrc/OleDB/OleDB.upp delete mode 100644 archive/uppsrc/OleDB/OleDBSchema.h delete mode 100644 archive/uppsrc/SqlCommander/Copying delete mode 100644 archive/uppsrc/SqlCommander/SqlCommander.cpp delete mode 100644 archive/uppsrc/SqlCommander/SqlCommander.h delete mode 100644 archive/uppsrc/SqlCommander/SqlCommander.upp delete mode 100644 archive/uppsrc/SqlCommander/StdAfx.cpp delete mode 100644 archive/uppsrc/SqlCommander/login.lay delete mode 100644 archive/uppsrc/TCore/Calc.upp delete mode 100644 archive/uppsrc/TCore/CalcBasic.cpp delete mode 100644 archive/uppsrc/TCore/CalcBasic.h delete mode 100644 archive/uppsrc/TCore/CalcBasic.hpp delete mode 100644 archive/uppsrc/TCore/CalcNode.cpp delete mode 100644 archive/uppsrc/TCore/CalcNode.h delete mode 100644 archive/uppsrc/TCore/CalcType.cpp delete mode 100644 archive/uppsrc/TCore/CalcType.h delete mode 100644 archive/uppsrc/TCore/Copying delete mode 100644 archive/uppsrc/TCore/SqlConsole.cfg delete mode 100644 archive/uppsrc/TCore/TCore.h delete mode 100644 archive/uppsrc/TCore/TCore.t delete mode 100644 archive/uppsrc/TCore/TCore.upp delete mode 100644 archive/uppsrc/TCore/TCoreCalc.h delete mode 100644 archive/uppsrc/TCore/TCoreDb.h delete mode 100644 archive/uppsrc/TCore/TCore_init.icpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcArith_cs-cz.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcArith_en-us.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcArray_cs-cz.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcArray_en-us.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcDate_cs-cz.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcDate_en-us.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcLog_cs-cz.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcLog_en-us.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcNode_cs-cz.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcNode_en-us.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcSys_cs-cz.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcSys_en-us.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcText_cs-cz.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcText_en-us.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcTrans_cs-cz.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/CalcTrans_en-us.tpp delete mode 100644 archive/uppsrc/TCore/appdoc.tpp/all.i delete mode 100644 archive/uppsrc/TCore/atexit.cpp delete mode 100644 archive/uppsrc/TCore/database.cpp delete mode 100644 archive/uppsrc/TCore/database.h delete mode 100644 archive/uppsrc/TCore/datafile.cpp delete mode 100644 archive/uppsrc/TCore/datafile.h delete mode 100644 archive/uppsrc/TCore/datatest.cpp delete mode 100644 archive/uppsrc/TCore/dbf.h delete mode 100644 archive/uppsrc/TCore/dd_cpp.h delete mode 100644 archive/uppsrc/TCore/dd_h.h delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CabsN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CabsN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CaddAA_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CaddAA_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CaddDN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CaddDN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CaddND_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CaddND_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CaddNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CaddNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CaddSS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CaddSS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cadd_monthsDN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cadd_monthsDN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cadd_yearsDN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cadd_yearsDN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CarccosN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CarccosN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CarcsinN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CarcsinN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CarctgN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CarctgN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CarrayCtr_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CarrayCtr_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CarrayIndex_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CarrayIndex_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CarrayRange_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CascS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CascS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CavgA_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CbitAndNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CbitAndNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CbitNotN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CbitNotN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CbitOrNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CbitOrNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CbitXorNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CbitXorNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CcallSV_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CcatSSS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CcatSSS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CceilNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CceilNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CceilN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CceilN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CceilrNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CceilrNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CchrN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CchrN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CcosN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CcosN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CcountA_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CcountA_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CcountNS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CcountNS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cdate0_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cdate0_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CdateNNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CdateNNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CdateNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CdateNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CdateN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CdateN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CdayD_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CdayD_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cday_of_weekD_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cday_of_weekD_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CdivNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CdivNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Ce0_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Ce0_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CeqVV_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CeqVV_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CexpN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CexpN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cfirst_day_of_monthD_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cfirst_day_of_monthD_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CfloorNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CfloorNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CfloorN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CfloorN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CfloorrNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CfloorrNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CftextNI_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CftextNI_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CftextN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CftextN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CgeNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CgeNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CgeSS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CgeSS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CgeTT_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CgeTT_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CgtNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CgtNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CgtSS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CgtSS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CgtTT_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CgtTT_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ChourT_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ChourT_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ChypotNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ChypotNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cis_dateV_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cis_dateV_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cis_nullV_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cis_nullV_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cis_numberV_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cis_numberV_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cis_textV_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cis_textV_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Citext0NN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CitextNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CitextN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Clast_day_of_monthD_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Clast_day_of_monthD_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CleNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CleNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CleSS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CleSS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CleTT_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CleTT_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CleftAN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CleftAN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CleftSN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CleftSN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ClenS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ClenS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CllpadSNS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CllpadSN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ClnN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ClnN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ClogN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ClogN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ClogNotN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ClogNotN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ClogNotS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ClogNotS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ClpadSNS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$ClpadSN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CltNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CltNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CltSS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CltSS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CltTT_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CltTT_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmaxA_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmaxNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmaxNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmaxSS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmaxSS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmaxTT_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmaxTT_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmidANN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmidANN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmidAN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmidAN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmidSNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmidSNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmidSN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmidSN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminA_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminSS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminSS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminTT_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminTT_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminmaxNNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminmaxNNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminmaxSSS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminmaxSSS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminmaxTTT_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminmaxTTT_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminusN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminusN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminuteT_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CminuteT_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmodNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmodNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmonthD_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmonthD_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmulAC_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmulAC_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmulNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmulNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmulNS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmulNS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmulSN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CmulSN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CneVV_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CneVV_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnlsNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnlsNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnlsN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnlsN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnlsrNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnlsrNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnlsrN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnlsrN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cnull0_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cnull0_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnumberSN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnumberSN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnumberS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnumberS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnvlVV_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CnvlVV_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cpi0_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cpi0_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CplusN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CplusN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CpowNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CpowNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CreplaceSSS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CrightAN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CrightAN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CrightSN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CrightSN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CroundNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CroundNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CroundN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CroundN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CroundrNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CroundrNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CrpadSNS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CrpadSN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CrrpadSNS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CrrpadSN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsalNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsalNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsarNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsarNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsecondT_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsecondT_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsgnN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsgnN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsinN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsinN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsqrN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsqrN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsqrtN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsqrtN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CstringIndex_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CstringIndex_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsubDD_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsubDD_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsubDN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsubDN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsubNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsubNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsumASC_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsumASC_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsumA_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CsumA_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CtextA_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CtextA_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CtextD_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CtextD_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CtextN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CtextN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CtextS_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CtextS_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CtgN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CtgN_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CtimeNNNNNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CyearD_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$CyearD_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cyears_betweenDD_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_Calc$Cyears_betweenDD_EN-US.dpx delete mode 100644 archive/uppsrc/TCore/doc.dpp/AppDoc_CalcNode_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCore/globcfg.cpp delete mode 100644 archive/uppsrc/TCore/globcfg.h delete mode 100644 archive/uppsrc/TCore/help.cpp delete mode 100644 archive/uppsrc/TCore/help.h delete mode 100644 archive/uppsrc/TCore/hxx.h delete mode 100644 archive/uppsrc/TCore/iw.ico delete mode 100644 archive/uppsrc/TCore/new_fmt.hpp delete mode 100644 archive/uppsrc/TCore/new_lang.hpp delete mode 100644 archive/uppsrc/TCore/nls_bw.h delete mode 100644 archive/uppsrc/TCore/nls_bw.hpp delete mode 100644 archive/uppsrc/TCore/service/service.cpp delete mode 100644 archive/uppsrc/TCore/service/service.h delete mode 100644 archive/uppsrc/TCore/service/service.upp delete mode 100644 archive/uppsrc/TCore/setop.h delete mode 100644 archive/uppsrc/TCore/tcore.usc delete mode 100644 archive/uppsrc/TCore/template.h delete mode 100644 archive/uppsrc/TCore/util.cpp delete mode 100644 archive/uppsrc/TCore/util.h delete mode 100644 archive/uppsrc/TCore/xml.cpp delete mode 100644 archive/uppsrc/TCore/xml.h delete mode 100644 archive/uppsrc/TCore/xmlparse.cpp delete mode 100644 archive/uppsrc/TCore/xmlparse.h delete mode 100644 archive/uppsrc/TCtrlLib/Calc/Calc.upp delete mode 100644 archive/uppsrc/TCtrlLib/Calc/CalcGuiType.cpp delete mode 100644 archive/uppsrc/TCtrlLib/Calc/CalcGuiType.h delete mode 100644 archive/uppsrc/TCtrlLib/Calc/CalcGuiType.hpp delete mode 100644 archive/uppsrc/TCtrlLib/Calc/CalcHelp.cpp delete mode 100644 archive/uppsrc/TCtrlLib/Calc/DlgCalc.cpp delete mode 100644 archive/uppsrc/TCtrlLib/Calc/DlgCalc.lay delete mode 100644 archive/uppsrc/TCtrlLib/Calc/TCtrlLibCalc.h delete mode 100644 archive/uppsrc/TCtrlLib/Calc/TCtrlLibCalc.t delete mode 100644 archive/uppsrc/TCtrlLib/Calc/TCtrlLibCalc_init.icpp delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CbottomR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CbottomR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CbottomcenterR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CbottomcenterR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CbottomleftR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CbottomleftR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CbottomrightR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CbottomrightR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CcenterR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CcenterR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CcenterleftR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CcenterleftR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CcenterrightR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CcenterrightR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CheightR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CheightR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CleftR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CleftR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CpointNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CpointNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CrectNNNN_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CrectNNNN_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CrectPP_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CrectPP_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CrectP_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CrectP_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CrightR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CrightR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CtextP_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CtextP_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CtextR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CtextR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CtopR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CtopR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CtopcenterR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CtopcenterR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CtopleftR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CtopleftR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CtoprightR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CtoprightR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CwidthR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CwidthR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CxP_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CxP_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CxcenterR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CxcenterR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CxmaxR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CxmaxR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CxminR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CxminR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CyP_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CyP_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CycenterR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CycenterR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CymaxR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CymaxR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CyminR_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_Calc$CyminR_EN-US.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/AppDoc_DlgCalc_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Calc/doc.dpp/links delete mode 100644 archive/uppsrc/TCtrlLib/Copying delete mode 100644 archive/uppsrc/TCtrlLib/CtrlArray.cpp delete mode 100644 archive/uppsrc/TCtrlLib/CtrlArray.h delete mode 100644 archive/uppsrc/TCtrlLib/DocMgr.cpp delete mode 100644 archive/uppsrc/TCtrlLib/DocMgr.h delete mode 100644 archive/uppsrc/TCtrlLib/DocMgr.iml delete mode 100644 archive/uppsrc/TCtrlLib/DocMgr.lay delete mode 100644 archive/uppsrc/TCtrlLib/DocMgr.lng delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgFormula.cpp delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgFormula.hpp delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgFormula.lay delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgHelp.cpp delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgHelp.hpp delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgHelp.lay delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgHelp.lng delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgHelpEdit.cpp delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgHelpEdit.lay delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgHelpEdit.lng delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgHelpView.cpp delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgHelpView.hpp delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgHelpView.iml delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgHelpView.lay delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgHelpView.lng delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgShot.cpp delete mode 100644 archive/uppsrc/TCtrlLib/Help/DlgShot.lay delete mode 100644 archive/uppsrc/TCtrlLib/Help/Help.upp delete mode 100644 archive/uppsrc/TCtrlLib/Help/TCtrlLibHelp.h delete mode 100644 archive/uppsrc/TCtrlLib/Help/doc.dpp/AppDoc_DlgFormula_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Help/doc.dpp/AppDoc_sys_book_expand_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TCtrlLib/Help/helpgen.cpp delete mode 100644 archive/uppsrc/TCtrlLib/Help/helputil.cpp delete mode 100644 archive/uppsrc/TCtrlLib/Help/helputil.h delete mode 100644 archive/uppsrc/TCtrlLib/Help/notes.txt delete mode 100644 archive/uppsrc/TCtrlLib/Help/richform.cpp delete mode 100644 archive/uppsrc/TCtrlLib/OldTreeCtrl.cpp delete mode 100644 archive/uppsrc/TCtrlLib/OldTreeCtrl.h delete mode 100644 archive/uppsrc/TCtrlLib/OldTreeCtrl.iml delete mode 100644 archive/uppsrc/TCtrlLib/OldTreeCtrl.lng delete mode 100644 archive/uppsrc/TCtrlLib/Ruler.cpp delete mode 100644 archive/uppsrc/TCtrlLib/Ruler.h delete mode 100644 archive/uppsrc/TCtrlLib/TCtrlImg.cpp delete mode 100644 archive/uppsrc/TCtrlLib/TCtrlImg.h delete mode 100644 archive/uppsrc/TCtrlLib/TCtrlLib.h delete mode 100644 archive/uppsrc/TCtrlLib/TCtrlLib.t delete mode 100644 archive/uppsrc/TCtrlLib/TCtrlLib.upp delete mode 100644 archive/uppsrc/TCtrlLib/TCtrlLib.usc delete mode 100644 archive/uppsrc/TCtrlLib/TCtrlLib_init.icpp delete mode 100644 archive/uppsrc/TCtrlLib/TreeCtrlImg.h delete mode 100644 archive/uppsrc/TCtrlLib/appdoc.tpp/CalcGuiType_cs-cz.tpp delete mode 100644 archive/uppsrc/TCtrlLib/appdoc.tpp/CalcGuiType_en-us.tpp delete mode 100644 archive/uppsrc/TCtrlLib/appdoc.tpp/DlgCalc_cs-cz.tpp delete mode 100644 archive/uppsrc/TCtrlLib/appdoc.tpp/all.i delete mode 100644 archive/uppsrc/TCtrlLib/tctrllib.iml delete mode 100644 archive/uppsrc/TCtrlLib/template.h delete mode 100644 archive/uppsrc/TCtrlLib/util.cpp delete mode 100644 archive/uppsrc/TCtrlLib/util.h delete mode 100644 archive/uppsrc/TDraw/Copying delete mode 100644 archive/uppsrc/TDraw/TDraw.h delete mode 100644 archive/uppsrc/TDraw/TDraw.upp delete mode 100644 archive/uppsrc/TDraw/formula.cpp delete mode 100644 archive/uppsrc/TDraw/formula.h delete mode 100644 archive/uppsrc/TDraw/util.cpp delete mode 100644 archive/uppsrc/TDraw/util.h delete mode 100644 archive/uppsrc/TServ/Copying delete mode 100644 archive/uppsrc/TServ/Makefile delete mode 100644 archive/uppsrc/TServ/Makefile.solaris delete mode 100644 archive/uppsrc/TServ/Makefile.ubuntu delete mode 100644 archive/uppsrc/TServ/TServ.sh delete mode 100644 archive/uppsrc/TServ/TServ.upp delete mode 100644 archive/uppsrc/TServ/err delete mode 100644 archive/uppsrc/TServ/tserv.cpp delete mode 100644 archive/uppsrc/TServ/version.h delete mode 100644 archive/uppsrc/TSql/Copying delete mode 100644 archive/uppsrc/TSql/Ctrl/Ctrl.upp delete mode 100644 archive/uppsrc/TSql/Ctrl/DlgLogin.cpp delete mode 100644 archive/uppsrc/TSql/Ctrl/DlgLogin.h delete mode 100644 archive/uppsrc/TSql/Ctrl/DlgLogin.hpp delete mode 100644 archive/uppsrc/TSql/Ctrl/DlgLogin.lay delete mode 100644 archive/uppsrc/TSql/Ctrl/DlgLogin.lng delete mode 100644 archive/uppsrc/TSql/Ctrl/TSqlCtrl.h delete mode 100644 archive/uppsrc/TSql/Ctrl/TSqlCtrl.icpp delete mode 100644 archive/uppsrc/TSql/Ctrl/TSqlCtrl.t delete mode 100644 archive/uppsrc/TSql/Ctrl/doc.dpp/AppDoc_DlgLoginSetPass_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TSql/Ctrl/doc.dpp/AppDoc_DlgLogin_CS-CZ15.dpx delete mode 100644 archive/uppsrc/TSql/Ctrl/doc.dpp/links delete mode 100644 archive/uppsrc/TSql/TSql.h delete mode 100644 archive/uppsrc/TSql/TSql.t delete mode 100644 archive/uppsrc/TSql/TSql.upp delete mode 100644 archive/uppsrc/TSql/TSql_init.icpp delete mode 100644 archive/uppsrc/TSql/dict.cpp delete mode 100644 archive/uppsrc/TSql/dict.h delete mode 100644 archive/uppsrc/TSql/id.h delete mode 100644 archive/uppsrc/TSql/template.h delete mode 100644 archive/uppsrc/TSql/util.cpp delete mode 100644 archive/uppsrc/TSql/util.h delete mode 100644 archive/uppsrc/Updater/Copying delete mode 100644 archive/uppsrc/Updater/Resource.h delete mode 100644 archive/uppsrc/Updater/Updater.cpp delete mode 100644 archive/uppsrc/Updater/Updater.h delete mode 100644 archive/uppsrc/Updater/Updater.ico delete mode 100644 archive/uppsrc/Updater/Updater.rc delete mode 100644 archive/uppsrc/Updater/Updater.upp delete mode 100644 archive/uppsrc/Web/Copying delete mode 100644 archive/uppsrc/Web/SSL/Copying delete mode 100644 archive/uppsrc/Web/SSL/SSL.h delete mode 100644 archive/uppsrc/Web/SSL/SSL.upp delete mode 100644 archive/uppsrc/Web/SSL/WebSSL.h delete mode 100644 archive/uppsrc/Web/SSL/httpscli.cpp delete mode 100644 archive/uppsrc/Web/SSL/src.tpp/index_en-us.tpp delete mode 100644 archive/uppsrc/Web/SSL/srcdoc.tpp/index_en-us.tpp delete mode 100644 archive/uppsrc/Web/SSL/srcimp.tpp/index_en-us.tpp delete mode 100644 archive/uppsrc/Web/SSL/util.cpp delete mode 100644 archive/uppsrc/Web/ScgiServer.cpp delete mode 100644 archive/uppsrc/Web/ScgiServer.h delete mode 100644 archive/uppsrc/Web/Web.h delete mode 100644 archive/uppsrc/Web/Web.t delete mode 100644 archive/uppsrc/Web/Web.upp delete mode 100644 archive/uppsrc/Web/Web_init.icpp delete mode 100644 archive/uppsrc/Web/auth.cpp delete mode 100644 archive/uppsrc/Web/auth.h delete mode 100644 archive/uppsrc/Web/ctrl/Copying delete mode 100644 archive/uppsrc/Web/ctrl/DlgHttpServer.cpp delete mode 100644 archive/uppsrc/Web/ctrl/DlgHttpServer.h delete mode 100644 archive/uppsrc/Web/ctrl/DlgHttpServer.lay delete mode 100644 archive/uppsrc/Web/ctrl/DlgHttpServer.lng delete mode 100644 archive/uppsrc/Web/ctrl/WebCtrl.h delete mode 100644 archive/uppsrc/Web/ctrl/WebImg.h delete mode 100644 archive/uppsrc/Web/ctrl/ctrl.upp delete mode 100644 archive/uppsrc/Web/ctrl/web.iml delete mode 100644 archive/uppsrc/Web/html.cpp delete mode 100644 archive/uppsrc/Web/html.h delete mode 100644 archive/uppsrc/Web/httpcli.cpp delete mode 100644 archive/uppsrc/Web/httpcli.h delete mode 100644 archive/uppsrc/Web/httpcli_old.cpp delete mode 100644 archive/uppsrc/Web/httpsrv.cpp delete mode 100644 archive/uppsrc/Web/httpsrv.h delete mode 100644 archive/uppsrc/Web/md5.cpp delete mode 100644 archive/uppsrc/Web/smtp.cpp delete mode 100644 archive/uppsrc/Web/smtp.h delete mode 100644 archive/uppsrc/Web/socket.cpp delete mode 100644 archive/uppsrc/Web/socket.h delete mode 100644 archive/uppsrc/Web/sproc.cpp delete mode 100644 archive/uppsrc/Web/sproc.h delete mode 100644 archive/uppsrc/Web/srcdoc.tpp/AboutUppSockets_en-us.tpp delete mode 100644 archive/uppsrc/Web/srcdoc.tpp/ConnectionOriented_en-us.tpp delete mode 100644 archive/uppsrc/Web/srcdoc.tpp/MiscSocketInfo_en-us.tpp delete mode 100644 archive/uppsrc/Web/srcdoc.tpp/SocketExample1_en-us.tpp delete mode 100644 archive/uppsrc/Web/srcdoc.tpp/SocketPitfalls_en-us.tpp delete mode 100644 archive/uppsrc/Web/srcdoc.tpp/index_en-us.tpp delete mode 100644 archive/uppsrc/Web/srcimp.tpp/index_en-us.tpp delete mode 100644 archive/uppsrc/Web/util.cpp delete mode 100644 archive/uppsrc/Web/util.h delete mode 100644 archive/uppsrc/Web/wisapi/Copying delete mode 100644 archive/uppsrc/Web/wisapi/version.h delete mode 100644 archive/uppsrc/Web/wisapi/wisapi.cpp delete mode 100644 archive/uppsrc/Web/wisapi/wisapi.def delete mode 100644 archive/uppsrc/Web/wisapi/wisapi.lng delete mode 100644 archive/uppsrc/Web/wisapi/wisapi.t delete mode 100644 archive/uppsrc/Web/wisapi/wisapi.upp delete mode 100644 archive/uppsrc/Web/wisapi/wisapicfg.cpp delete mode 100644 archive/uppsrc/Web/wisapi/wisapicfg.h delete mode 100644 archive/uppsrc/coff/Copying delete mode 100644 archive/uppsrc/coff/binobj/Copying delete mode 100644 archive/uppsrc/coff/binobj/binobj.cpp delete mode 100644 archive/uppsrc/coff/binobj/binobj.h delete mode 100644 archive/uppsrc/coff/binobj/binobj.upp delete mode 100644 archive/uppsrc/coff/coff.cpp delete mode 100644 archive/uppsrc/coff/coff.h delete mode 100644 archive/uppsrc/coff/coff.upp delete mode 100644 archive/uppsrc/coff/defs.cpp delete mode 100644 archive/uppsrc/coff/defs.h delete mode 100644 archive/uppsrc/coff/imagehlp.dli delete mode 100644 archive/uppsrc/coff/lib.cpp delete mode 100644 archive/uppsrc/coff/lib.h delete mode 100644 archive/uppsrc/coff/stab.def delete mode 100644 archive/uppsrc/coff/uar/Copying delete mode 100644 archive/uppsrc/coff/uar/lib.cpp delete mode 100644 archive/uppsrc/coff/uar/lib.h delete mode 100644 archive/uppsrc/coff/uar/main.cpp delete mode 100644 archive/uppsrc/coff/uar/uar.h delete mode 100644 archive/uppsrc/coff/uar/uar.upp delete mode 100644 archive/uppsrc/coff/uar/version.h delete mode 100644 archive/uppsrc/coff/uld/Copying delete mode 100644 archive/uppsrc/coff/uld/diff delete mode 100644 archive/uppsrc/coff/uld/dump.cpp delete mode 100644 archive/uppsrc/coff/uld/linkjob.cpp delete mode 100644 archive/uppsrc/coff/uld/main.cpp delete mode 100644 archive/uppsrc/coff/uld/notes.txt delete mode 100644 archive/uppsrc/coff/uld/obj.h delete mode 100644 archive/uppsrc/coff/uld/object.cpp delete mode 100644 archive/uppsrc/coff/uld/uld.h delete mode 100644 archive/uppsrc/coff/uld/uld.upp delete mode 100644 archive/uppsrc/coff/uld/version.h delete mode 100644 archive/uppsrc/coff/util.cpp delete mode 100644 archive/uppsrc/coff/util.h delete mode 100644 archive/uppsrc/docpp/Copying delete mode 100644 archive/uppsrc/docpp/Parser.cpp delete mode 100644 archive/uppsrc/docpp/Pre.cpp delete mode 100644 archive/uppsrc/docpp/cpplex.cpp delete mode 100644 archive/uppsrc/docpp/docpp.h delete mode 100644 archive/uppsrc/docpp/docpp.upp delete mode 100644 archive/uppsrc/docpp/keyword.i delete mode 100644 archive/uppsrc/plugin/wincert/pdf.cpp delete mode 100644 archive/uppsrc/plugin/wincert/util.cpp delete mode 100644 archive/uppsrc/plugin/wincert/wincert.h delete mode 100644 archive/uppsrc/plugin/wincert/wincert.upp delete mode 100644 archive/uppsrc/rw/Alias.cpp delete mode 100644 archive/uppsrc/rw/Copying delete mode 100644 archive/uppsrc/rw/Designer.cpp delete mode 100644 archive/uppsrc/rw/Designer.h delete mode 100644 archive/uppsrc/rw/Designer.lay delete mode 100644 archive/uppsrc/rw/DesignerFile.cpp delete mode 100644 archive/uppsrc/rw/DesignerLayt.cpp delete mode 100644 archive/uppsrc/rw/DesignerWin.cpp delete mode 100644 archive/uppsrc/rw/ItemCtrl.cpp delete mode 100644 archive/uppsrc/rw/Lang.cpp delete mode 100644 archive/uppsrc/rw/StdCtrls.cpp delete mode 100644 archive/uppsrc/rw/Util.cpp delete mode 100644 archive/uppsrc/rw/doc.dpp/AppDoc_RW_NewFeatures_EN-US.dpp delete mode 100644 archive/uppsrc/rw/doc.dpp/links delete mode 100644 archive/uppsrc/rw/iderw.h delete mode 100644 archive/uppsrc/rw/rw.ico delete mode 100644 archive/uppsrc/rw/rw.iml delete mode 100644 archive/uppsrc/rw/rw.rc delete mode 100644 archive/uppsrc/rw/rw.upp diff --git a/archive/OleCalc/OleCalc.upp b/archive/OleCalc/OleCalc.upp deleted file mode 100644 index ce0f034cf..000000000 --- a/archive/OleCalc/OleCalc.upp +++ /dev/null @@ -1,32 +0,0 @@ -description "Simple example of ActiveX control\377"; - -noblitz; - -uses - Ole\Ctrl, - CtrlLib, - Esc; - -target - calc.ocx; - -link - /def:calc.def; - -file - calc.idl, - calc_idl.h, - calc.cpp, - calc_idl.cpp, - calc.lay, - calc.def, - calc.rc - depends() calc.tlb; - -mainconfig - "" = "GUI DLL MT"; - -custom() "post-link", - "regsvr32 /s /c $(OUTPATH)", - ""; - diff --git a/archive/OleCalc/calc.cpp b/archive/OleCalc/calc.cpp deleted file mode 100644 index b9961ef83..000000000 --- a/archive/OleCalc/calc.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include -#include -#include - -#include "calc_idl.h" - -using namespace Upp; - -#define LAYOUTFILE "calc.lay" -#include - -class Calculator : public WithCalculatorLayout, public DispatchInterface { - void Eval(); - -public: - virtual void Paint(UPP::Draw& w); - - STDMETHOD(get_Input)(BSTR *result); - STDMETHOD(put_Input)(BSTR input); - STDMETHOD(Calculate)(); - STDMETHOD(get_Output)(BSTR *result); - - typedef Calculator CLASSNAME; - Calculator(); -}; - -OCX_OBJECT(Calculator) - -void Calculator::Paint(UPP::Draw& w) -{ - w.DrawRect(GetSize(), SColorFace()); -} - -Calculator::Calculator() -{ - CtrlLayout(*this); - ok.Ok() <<= THISBACK(Eval); - ok.Tip("Evaluate given expression"); - NoWantFocus(); -} - -void Calculator::Eval() -{ - ArrayMap global; - value <<= Evaluate((String)~expr, global).ToString(); -} - -HRESULT Calculator::get_Input(BSTR *result) -{ - ReturnString(result, ~expr); - return S_OK; -} - -HRESULT Calculator::put_Input(BSTR input) -{ - expr <<= BSTRToString(input); - return S_OK; -} - -HRESULT Calculator::Calculate() -{ - Eval(); - return S_OK; -} - -HRESULT Calculator::get_Output(BSTR *result) -{ - ReturnString(result, ~value); - return S_OK; -} - -OCX_APP_MAIN -{ - SetLanguage(LNG_CZECH); - SetDefaultCharset(CHARSET_WIN1250); -} diff --git a/archive/OleCalc/calc.def b/archive/OleCalc/calc.def deleted file mode 100644 index fcbafd738..000000000 --- a/archive/OleCalc/calc.def +++ /dev/null @@ -1,7 +0,0 @@ -LIBRARY "OleCalc.dll" - -EXPORTS - DllCanUnloadNow PRIVATE - DllGetClassObject PRIVATE - DllRegisterServer PRIVATE - DllUnregisterServer PRIVATE diff --git a/archive/OleCalc/calc.idl b/archive/OleCalc/calc.idl deleted file mode 100644 index ce1ef5ca1..000000000 --- a/archive/OleCalc/calc.idl +++ /dev/null @@ -1,41 +0,0 @@ -// calculator.idl: simple OCX expression evaluator. - -import "oaidl.idl"; -import "oleidl.idl"; - -[ - object, - uuid(2CFA5DB2-A740-11d3-981C-000000000000), - dual, - helpstring("ICalculator Interface") -] -interface ICalculator : IDispatch -{ - [id(1), propget, helpstring("Returns and sets calculator input field text (expression).")] - HRESULT Input([out, retval] BSTR *_value); - [propput, helpstring("Put")] - HRESULT Input([in] BSTR _value); - [id(2), helpstring("Calculate computes the result and places the it in the history list.")] - HRESULT Calculate(); - [id(3), propget, helpstring("Value retrieves the result of the computation.")] - HRESULT Output([out, retval] BSTR *value); -}; - -[ - uuid(2CFA5DB0-A740-11d3-981C-000000000000), - version(1.0), - helpstring("Ultimate Calculator 1.0 Type Library") -] -library Calculator_TypeLib -{ - importlib("stdole32.tlb"); - - [ - uuid(2CFA5DB1-A740-11d3-981C-000000000000), - helpstring("Calculator Control") - ] - coclass Calculator - { - [default] interface ICalculator; - }; -}; diff --git a/archive/OleCalc/calc.lay b/archive/OleCalc/calc.lay deleted file mode 100644 index 101c47c3a..000000000 --- a/archive/OleCalc/calc.lay +++ /dev/null @@ -1,7 +0,0 @@ -LAYOUT(CalculatorLayout, 376, 56) - ITEM(Label, dv___0, SetLabel(t_("Expression")).LeftPosZ(4, 56).TopPosZ(4, 19)) - ITEM(EditField, expr, HSizePosZ(64, 4).TopPosZ(4, 19)) - ITEM(Label, dv___2, SetLabel(t_("Value:")).LeftPosZ(112, 56).TopPosZ(28, 16)) - ITEM(EditField, value, HSizePosZ(168, 4).TopPosZ(26, 19)) - ITEM(Button, ok, SetLabel(t_("Evaluate")).LeftPosZ(4, 80).TopPosZ(28, 22)) -END_LAYOUT diff --git a/archive/OleCalc/calc.rc b/archive/OleCalc/calc.rc deleted file mode 100644 index c22428648..000000000 --- a/archive/OleCalc/calc.rc +++ /dev/null @@ -1 +0,0 @@ -1 TYPELIB "calc.idl" diff --git a/archive/OleCalc/calc.tlb b/archive/OleCalc/calc.tlb deleted file mode 100644 index 26f1be3d2..000000000 --- a/archive/OleCalc/calc.tlb +++ /dev/null @@ -1 +0,0 @@ -MSFT \ No newline at end of file diff --git a/archive/OleCalc/calc_idl.cpp b/archive/OleCalc/calc_idl.cpp deleted file mode 100644 index b6730a15f..000000000 --- a/archive/OleCalc/calc_idl.cpp +++ /dev/null @@ -1,179 +0,0 @@ - - -/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ - -/* link this file in with the server and any clients */ - - - /* File created by MIDL compiler version 6.00.0361 */ -/* at Thu Jan 24 22:09:58 2008 - */ -/* Compiler settings for d:\examples\OleCalc\calc.idl: - Oicf, W1, Zp8, env=Win32 (32b run) - protocol : dce , ms_ext, c_ext, robust - 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_AMD64) - - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - - -#ifdef __cplusplus -extern "C"{ -#endif - - -#include -#include - -#ifdef _MIDL_USE_GUIDDEF_ - -#ifndef INITGUID -#define INITGUID -#include -#undef INITGUID -#else -#include -#endif - -#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ - DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) - -#else // !_MIDL_USE_GUIDDEF_ - -#ifndef __IID_DEFINED__ -#define __IID_DEFINED__ - -typedef struct _IID -{ - unsigned long x; - unsigned short s1; - unsigned short s2; - unsigned char c[8]; -} IID; - -#endif // __IID_DEFINED__ - -#ifndef CLSID_DEFINED -#define CLSID_DEFINED -typedef IID CLSID; -#endif // CLSID_DEFINED - -#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ - const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} - -#endif - -MIDL_DEFINE_GUID(IID, IID_ICalculator,0x2CFA5DB2,0xA740,0x11d3,0x98,0x1C,0x00,0x00,0x00,0x00,0x00,0x00); - - -MIDL_DEFINE_GUID(IID, LIBID_Calculator_TypeLib,0x2CFA5DB0,0xA740,0x11d3,0x98,0x1C,0x00,0x00,0x00,0x00,0x00,0x00); - - -MIDL_DEFINE_GUID(CLSID, CLSID_Calculator,0x2CFA5DB1,0xA740,0x11d3,0x98,0x1C,0x00,0x00,0x00,0x00,0x00,0x00); - -#undef MIDL_DEFINE_GUID - -#ifdef __cplusplus -} -#endif - - - -#endif /* !defined(_M_IA64) && !defined(_M_AMD64)*/ - - - -/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ - -/* link this file in with the server and any clients */ - - - /* File created by MIDL compiler version 6.00.0361 */ -/* at Thu Jan 24 22:09:58 2008 - */ -/* Compiler settings for d:\examples\OleCalc\calc.idl: - Oicf, W1, Zp8, env=Win64 (32b run,appending) - protocol : dce , ms_ext, c_ext, robust - 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_AMD64) - - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - - -#ifdef __cplusplus -extern "C"{ -#endif - - -#include -#include - -#ifdef _MIDL_USE_GUIDDEF_ - -#ifndef INITGUID -#define INITGUID -#include -#undef INITGUID -#else -#include -#endif - -#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ - DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) - -#else // !_MIDL_USE_GUIDDEF_ - -#ifndef __IID_DEFINED__ -#define __IID_DEFINED__ - -typedef struct _IID -{ - unsigned long x; - unsigned short s1; - unsigned short s2; - unsigned char c[8]; -} IID; - -#endif // __IID_DEFINED__ - -#ifndef CLSID_DEFINED -#define CLSID_DEFINED -typedef IID CLSID; -#endif // CLSID_DEFINED - -#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ - const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} - -#endif - -MIDL_DEFINE_GUID(IID, IID_ICalculator,0x2CFA5DB2,0xA740,0x11d3,0x98,0x1C,0x00,0x00,0x00,0x00,0x00,0x00); - - -MIDL_DEFINE_GUID(IID, LIBID_Calculator_TypeLib,0x2CFA5DB0,0xA740,0x11d3,0x98,0x1C,0x00,0x00,0x00,0x00,0x00,0x00); - - -MIDL_DEFINE_GUID(CLSID, CLSID_Calculator,0x2CFA5DB1,0xA740,0x11d3,0x98,0x1C,0x00,0x00,0x00,0x00,0x00,0x00); - -#undef MIDL_DEFINE_GUID - -#ifdef __cplusplus -} -#endif - - - -#endif /* defined(_M_IA64) || defined(_M_AMD64)*/ diff --git a/archive/OleCalc/calc_idl.h b/archive/OleCalc/calc_idl.h deleted file mode 100644 index c9bceed14..000000000 --- a/archive/OleCalc/calc_idl.h +++ /dev/null @@ -1,304 +0,0 @@ - - -/* this ALWAYS GENERATED file contains the definitions for the interfaces */ - - - /* File created by MIDL compiler version 6.00.0366 */ -/* at Thu Jan 24 22:57:13 2008 - */ -/* Compiler settings for C:\Upp.uvs\examples.uc\OleCalc\calc.idl: - Oicf, W1, Zp8, env=Win32 (32b run) - protocol : dce , ms_ext, c_ext, robust - 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( ) - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ - - -/* verify that the version is high enough to compile this file*/ -#ifndef __REQUIRED_RPCNDR_H_VERSION__ -#define __REQUIRED_RPCNDR_H_VERSION__ 475 -#endif - -#include "rpc.h" -#include "rpcndr.h" - -#ifndef __RPCNDR_H_VERSION__ -#error this stub requires an updated version of -#endif // __RPCNDR_H_VERSION__ - -#ifndef COM_NO_WINDOWS_H -#include "windows.h" -#include "ole2.h" -#endif /*COM_NO_WINDOWS_H*/ - -#ifndef __calc_idl_h__ -#define __calc_idl_h__ - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -#pragma once -#endif - -/* Forward Declarations */ - -#ifndef __ICalculator_FWD_DEFINED__ -#define __ICalculator_FWD_DEFINED__ -typedef interface ICalculator ICalculator; -#endif /* __ICalculator_FWD_DEFINED__ */ - - -#ifndef __Calculator_FWD_DEFINED__ -#define __Calculator_FWD_DEFINED__ - -#ifdef __cplusplus -typedef class Calculator Calculator; -#else -typedef struct Calculator Calculator; -#endif /* __cplusplus */ - -#endif /* __Calculator_FWD_DEFINED__ */ - - -/* header files for imported files */ -#include "oaidl.h" -#include "oleidl.h" - -#ifdef __cplusplus -extern "C"{ -#endif - -void * __RPC_USER MIDL_user_allocate(size_t); -void __RPC_USER MIDL_user_free( void * ); - -#ifndef __ICalculator_INTERFACE_DEFINED__ -#define __ICalculator_INTERFACE_DEFINED__ - -/* interface ICalculator */ -/* [helpstring][dual][uuid][object] */ - - -EXTERN_C const IID IID_ICalculator; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("2CFA5DB2-A740-11d3-981C-000000000000") - ICalculator : public IDispatch - { - public: - virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Input( - /* [retval][out] */ BSTR *_value) = 0; - - virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Input( - /* [in] */ BSTR _value) = 0; - - virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Calculate( void) = 0; - - virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Output( - /* [retval][out] */ BSTR *value) = 0; - - }; - -#else /* C style interface */ - - typedef struct ICalculatorVtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - ICalculator * This, - /* [in] */ REFIID riid, - /* [iid_is][out] */ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - ICalculator * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - ICalculator * This); - - HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( - ICalculator * This, - /* [out] */ UINT *pctinfo); - - HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( - ICalculator * This, - /* [in] */ UINT iTInfo, - /* [in] */ LCID lcid, - /* [out] */ ITypeInfo **ppTInfo); - - HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( - ICalculator * This, - /* [in] */ REFIID riid, - /* [size_is][in] */ LPOLESTR *rgszNames, - /* [in] */ UINT cNames, - /* [in] */ LCID lcid, - /* [size_is][out] */ DISPID *rgDispId); - - /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( - ICalculator * This, - /* [in] */ DISPID dispIdMember, - /* [in] */ REFIID riid, - /* [in] */ LCID lcid, - /* [in] */ WORD wFlags, - /* [out][in] */ DISPPARAMS *pDispParams, - /* [out] */ VARIANT *pVarResult, - /* [out] */ EXCEPINFO *pExcepInfo, - /* [out] */ UINT *puArgErr); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Input )( - ICalculator * This, - /* [retval][out] */ BSTR *_value); - - /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Input )( - ICalculator * This, - /* [in] */ BSTR _value); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Calculate )( - ICalculator * This); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Output )( - ICalculator * This, - /* [retval][out] */ BSTR *value); - - END_INTERFACE - } ICalculatorVtbl; - - interface ICalculator - { - CONST_VTBL struct ICalculatorVtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define ICalculator_QueryInterface(This,riid,ppvObject) \ - (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) - -#define ICalculator_AddRef(This) \ - (This)->lpVtbl -> AddRef(This) - -#define ICalculator_Release(This) \ - (This)->lpVtbl -> Release(This) - - -#define ICalculator_GetTypeInfoCount(This,pctinfo) \ - (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) - -#define ICalculator_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ - (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) - -#define ICalculator_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ - (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) - -#define ICalculator_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ - (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) - - -#define ICalculator_get_Input(This,_value) \ - (This)->lpVtbl -> get_Input(This,_value) - -#define ICalculator_put_Input(This,_value) \ - (This)->lpVtbl -> put_Input(This,_value) - -#define ICalculator_Calculate(This) \ - (This)->lpVtbl -> Calculate(This) - -#define ICalculator_get_Output(This,value) \ - (This)->lpVtbl -> get_Output(This,value) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - -/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ICalculator_get_Input_Proxy( - ICalculator * This, - /* [retval][out] */ BSTR *_value); - - -void __RPC_STUB ICalculator_get_Input_Stub( - IRpcStubBuffer *This, - IRpcChannelBuffer *_pRpcChannelBuffer, - PRPC_MESSAGE _pRpcMessage, - DWORD *_pdwStubPhase); - - -/* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE ICalculator_put_Input_Proxy( - ICalculator * This, - /* [in] */ BSTR _value); - - -void __RPC_STUB ICalculator_put_Input_Stub( - IRpcStubBuffer *This, - IRpcChannelBuffer *_pRpcChannelBuffer, - PRPC_MESSAGE _pRpcMessage, - DWORD *_pdwStubPhase); - - -/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ICalculator_Calculate_Proxy( - ICalculator * This); - - -void __RPC_STUB ICalculator_Calculate_Stub( - IRpcStubBuffer *This, - IRpcChannelBuffer *_pRpcChannelBuffer, - PRPC_MESSAGE _pRpcMessage, - DWORD *_pdwStubPhase); - - -/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ICalculator_get_Output_Proxy( - ICalculator * This, - /* [retval][out] */ BSTR *value); - - -void __RPC_STUB ICalculator_get_Output_Stub( - IRpcStubBuffer *This, - IRpcChannelBuffer *_pRpcChannelBuffer, - PRPC_MESSAGE _pRpcMessage, - DWORD *_pdwStubPhase); - - - -#endif /* __ICalculator_INTERFACE_DEFINED__ */ - - - -#ifndef __Calculator_TypeLib_LIBRARY_DEFINED__ -#define __Calculator_TypeLib_LIBRARY_DEFINED__ - -/* library Calculator_TypeLib */ -/* [helpstring][version][uuid] */ - - -EXTERN_C const IID LIBID_Calculator_TypeLib; - -EXTERN_C const CLSID CLSID_Calculator; - -#ifdef __cplusplus - -class DECLSPEC_UUID("2CFA5DB1-A740-11d3-981C-000000000000") -Calculator; -#endif -#endif /* __Calculator_TypeLib_LIBRARY_DEFINED__ */ - -/* Additional Prototypes for ALL interfaces */ - -unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * ); -unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * ); -unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); -void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * ); - -/* end of Additional Prototypes */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/archive/OleCalc/calc_p.c b/archive/OleCalc/calc_p.c deleted file mode 100644 index 79065be8a..000000000 --- a/archive/OleCalc/calc_p.c +++ /dev/null @@ -1,889 +0,0 @@ - - -/* this ALWAYS GENERATED file contains the proxy stub code */ - - - /* File created by MIDL compiler version 6.00.0361 */ -/* at Thu Jan 24 22:09:58 2008 - */ -/* Compiler settings for d:\examples\OleCalc\calc.idl: - Oicf, W1, Zp8, env=Win32 (32b run) - protocol : dce , ms_ext, c_ext, robust - 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_AMD64) - - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ -#if _MSC_VER >= 1200 -#pragma warning(push) -#endif -#pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */ -#pragma warning( disable: 4211 ) /* redefine extent to static */ -#pragma warning( disable: 4232 ) /* dllimport identity*/ -#define USE_STUBLESS_PROXY - - -/* verify that the version is high enough to compile this file*/ -#ifndef __REDQ_RPCPROXY_H_VERSION__ -#define __REQUIRED_RPCPROXY_H_VERSION__ 475 -#endif - - -#include "rpcproxy.h" -#ifndef __RPCPROXY_H_VERSION__ -#error this stub requires an updated version of -#endif // __RPCPROXY_H_VERSION__ - - -#include "calc_idl.h" - -#define TYPE_FORMAT_STRING_SIZE 57 -#define PROC_FORMAT_STRING_SIZE 139 -#define TRANSMIT_AS_TABLE_SIZE 0 -#define WIRE_MARSHAL_TABLE_SIZE 1 - -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; - - -static RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax = -{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}; - - -extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString; -extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString; - - -extern const MIDL_STUB_DESC Object_StubDesc; - - -extern const MIDL_SERVER_INFO ICalculator_ServerInfo; -extern const MIDL_STUBLESS_PROXY_INFO ICalculator_ProxyInfo; - - -extern const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[ WIRE_MARSHAL_TABLE_SIZE ]; - -#if !defined(__RPC_WIN32__) -#error Invalid build platform for this stub. -#endif - -#if !(TARGET_IS_NT50_OR_LATER) -#error You need a Windows 2000 or later to run this stub because it uses these features: -#error /robust command line switch. -#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems. -#error This app will die there with the RPC_X_WRONG_STUB_VERSION error. -#endif - - -static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString = - { - 0, - { - - /* Procedure get_Input */ - - 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 2 */ NdrFcLong( 0x0 ), /* 0 */ -/* 6 */ NdrFcShort( 0x7 ), /* 7 */ -/* 8 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 10 */ NdrFcShort( 0x0 ), /* 0 */ -/* 12 */ NdrFcShort( 0x8 ), /* 8 */ -/* 14 */ 0x45, /* Oi2 Flags: srv must size, has return, has ext, */ - 0x2, /* 2 */ -/* 16 */ 0x8, /* 8 */ - 0x3, /* Ext Flags: new corr desc, clt corr check, */ -/* 18 */ NdrFcShort( 0x1 ), /* 1 */ -/* 20 */ NdrFcShort( 0x0 ), /* 0 */ -/* 22 */ NdrFcShort( 0x0 ), /* 0 */ - - /* Parameter _value */ - -/* 24 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -/* 26 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 28 */ NdrFcShort( 0x20 ), /* Type Offset=32 */ - - /* Return value */ - -/* 30 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 32 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 34 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure put_Input */ - -/* 36 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 38 */ NdrFcLong( 0x0 ), /* 0 */ -/* 42 */ NdrFcShort( 0x8 ), /* 8 */ -/* 44 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 46 */ NdrFcShort( 0x0 ), /* 0 */ -/* 48 */ NdrFcShort( 0x8 ), /* 8 */ -/* 50 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ - 0x2, /* 2 */ -/* 52 */ 0x8, /* 8 */ - 0x5, /* Ext Flags: new corr desc, srv corr check, */ -/* 54 */ NdrFcShort( 0x0 ), /* 0 */ -/* 56 */ NdrFcShort( 0x1 ), /* 1 */ -/* 58 */ NdrFcShort( 0x0 ), /* 0 */ - - /* Parameter _value */ - -/* 60 */ NdrFcShort( 0x8b ), /* Flags: must size, must free, in, by val, */ -/* 62 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 64 */ NdrFcShort( 0x2e ), /* Type Offset=46 */ - - /* Return value */ - -/* 66 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 68 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 70 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure Calculate */ - -/* 72 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 74 */ NdrFcLong( 0x0 ), /* 0 */ -/* 78 */ NdrFcShort( 0x9 ), /* 9 */ -/* 80 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 82 */ NdrFcShort( 0x0 ), /* 0 */ -/* 84 */ NdrFcShort( 0x8 ), /* 8 */ -/* 86 */ 0x44, /* Oi2 Flags: has return, has ext, */ - 0x1, /* 1 */ -/* 88 */ 0x8, /* 8 */ - 0x1, /* Ext Flags: new corr desc, */ -/* 90 */ NdrFcShort( 0x0 ), /* 0 */ -/* 92 */ NdrFcShort( 0x0 ), /* 0 */ -/* 94 */ NdrFcShort( 0x0 ), /* 0 */ - - /* Return value */ - -/* 96 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 98 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 100 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure get_Output */ - -/* 102 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 104 */ NdrFcLong( 0x0 ), /* 0 */ -/* 108 */ NdrFcShort( 0xa ), /* 10 */ -/* 110 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ -/* 112 */ NdrFcShort( 0x0 ), /* 0 */ -/* 114 */ NdrFcShort( 0x8 ), /* 8 */ -/* 116 */ 0x45, /* Oi2 Flags: srv must size, has return, has ext, */ - 0x2, /* 2 */ -/* 118 */ 0x8, /* 8 */ - 0x3, /* Ext Flags: new corr desc, clt corr check, */ -/* 120 */ NdrFcShort( 0x1 ), /* 1 */ -/* 122 */ NdrFcShort( 0x0 ), /* 0 */ -/* 124 */ NdrFcShort( 0x0 ), /* 0 */ - - /* Parameter value */ - -/* 126 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -/* 128 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ -/* 130 */ NdrFcShort( 0x20 ), /* Type Offset=32 */ - - /* Return value */ - -/* 132 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 134 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ -/* 136 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - 0x0 - } - }; - -static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString = - { - 0, - { - NdrFcShort( 0x0 ), /* 0 */ -/* 2 */ - 0x11, 0x4, /* FC_RP [alloced_on_stack] */ -/* 4 */ NdrFcShort( 0x1c ), /* Offset= 28 (32) */ -/* 6 */ - 0x13, 0x0, /* FC_OP */ -/* 8 */ NdrFcShort( 0xe ), /* Offset= 14 (22) */ -/* 10 */ - 0x1b, /* FC_CARRAY */ - 0x1, /* 1 */ -/* 12 */ NdrFcShort( 0x2 ), /* 2 */ -/* 14 */ 0x9, /* Corr desc: FC_ULONG */ - 0x0, /* */ -/* 16 */ NdrFcShort( 0xfffc ), /* -4 */ -/* 18 */ NdrFcShort( 0x1 ), /* Corr flags: early, */ -/* 20 */ 0x6, /* FC_SHORT */ - 0x5b, /* FC_END */ -/* 22 */ - 0x17, /* FC_CSTRUCT */ - 0x3, /* 3 */ -/* 24 */ NdrFcShort( 0x8 ), /* 8 */ -/* 26 */ NdrFcShort( 0xfff0 ), /* Offset= -16 (10) */ -/* 28 */ 0x8, /* FC_LONG */ - 0x8, /* FC_LONG */ -/* 30 */ 0x5c, /* FC_PAD */ - 0x5b, /* FC_END */ -/* 32 */ 0xb4, /* FC_USER_MARSHAL */ - 0x83, /* 131 */ -/* 34 */ NdrFcShort( 0x0 ), /* 0 */ -/* 36 */ NdrFcShort( 0x4 ), /* 4 */ -/* 38 */ NdrFcShort( 0x0 ), /* 0 */ -/* 40 */ NdrFcShort( 0xffde ), /* Offset= -34 (6) */ -/* 42 */ - 0x12, 0x0, /* FC_UP */ -/* 44 */ NdrFcShort( 0xffea ), /* Offset= -22 (22) */ -/* 46 */ 0xb4, /* FC_USER_MARSHAL */ - 0x83, /* 131 */ -/* 48 */ NdrFcShort( 0x0 ), /* 0 */ -/* 50 */ NdrFcShort( 0x4 ), /* 4 */ -/* 52 */ NdrFcShort( 0x0 ), /* 0 */ -/* 54 */ NdrFcShort( 0xfff4 ), /* Offset= -12 (42) */ - - 0x0 - } - }; - -static const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[ WIRE_MARSHAL_TABLE_SIZE ] = - { - - { - BSTR_UserSize - ,BSTR_UserMarshal - ,BSTR_UserUnmarshal - ,BSTR_UserFree - } - - }; - - - -/* Object interface: IUnknown, ver. 0.0, - GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */ - - -/* Object interface: IDispatch, ver. 0.0, - GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */ - - -/* Object interface: ICalculator, ver. 0.0, - GUID={0x2CFA5DB2,0xA740,0x11d3,{0x98,0x1C,0x00,0x00,0x00,0x00,0x00,0x00}} */ - -#pragma code_seg(".orpc") -static const unsigned short ICalculator_FormatStringOffsetTable[] = - { - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - 0, - 36, - 72, - 102 - }; - -static const MIDL_STUBLESS_PROXY_INFO ICalculator_ProxyInfo = - { - &Object_StubDesc, - __MIDL_ProcFormatString.Format, - &ICalculator_FormatStringOffsetTable[-3], - 0, - 0, - 0 - }; - - -static const MIDL_SERVER_INFO ICalculator_ServerInfo = - { - &Object_StubDesc, - 0, - __MIDL_ProcFormatString.Format, - &ICalculator_FormatStringOffsetTable[-3], - 0, - 0, - 0, - 0}; -CINTERFACE_PROXY_VTABLE(11) _ICalculatorProxyVtbl = -{ - &ICalculator_ProxyInfo, - &IID_ICalculator, - IUnknown_QueryInterface_Proxy, - IUnknown_AddRef_Proxy, - IUnknown_Release_Proxy , - 0 /* (void *) (INT_PTR) -1 /* IDispatch::GetTypeInfoCount */ , - 0 /* (void *) (INT_PTR) -1 /* IDispatch::GetTypeInfo */ , - 0 /* (void *) (INT_PTR) -1 /* IDispatch::GetIDsOfNames */ , - 0 /* IDispatch_Invoke_Proxy */ , - (void *) (INT_PTR) -1 /* ICalculator::get_Input */ , - (void *) (INT_PTR) -1 /* ICalculator::put_Input */ , - (void *) (INT_PTR) -1 /* ICalculator::Calculate */ , - (void *) (INT_PTR) -1 /* ICalculator::get_Output */ -}; - - -static const PRPC_STUB_FUNCTION ICalculator_table[] = -{ - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2 -}; - -CInterfaceStubVtbl _ICalculatorStubVtbl = -{ - &IID_ICalculator, - &ICalculator_ServerInfo, - 11, - &ICalculator_table[-3], - CStdStubBuffer_DELEGATING_METHODS -}; - -static const MIDL_STUB_DESC Object_StubDesc = - { - 0, - NdrOleAllocate, - NdrOleFree, - 0, - 0, - 0, - 0, - 0, - __MIDL_TypeFormatString.Format, - 1, /* -error bounds_check flag */ - 0x50002, /* Ndr library version */ - 0, - 0x6000169, /* MIDL Version 6.0.361 */ - 0, - UserMarshalRoutines, - 0, /* notify & notify_flag routine table */ - 0x1, /* MIDL flag */ - 0, /* cs routines */ - 0, /* proxy/server info */ - 0 /* Reserved5 */ - }; - -const CInterfaceProxyVtbl * _calc_ProxyVtblList[] = -{ - ( CInterfaceProxyVtbl *) &_ICalculatorProxyVtbl, - 0 -}; - -const CInterfaceStubVtbl * _calc_StubVtblList[] = -{ - ( CInterfaceStubVtbl *) &_ICalculatorStubVtbl, - 0 -}; - -PCInterfaceName const _calc_InterfaceNamesList[] = -{ - "ICalculator", - 0 -}; - -const IID * _calc_BaseIIDList[] = -{ - &IID_IDispatch, - 0 -}; - - -#define _calc_CHECK_IID(n) IID_GENERIC_CHECK_IID( _calc, pIID, n) - -int __stdcall _calc_IID_Lookup( const IID * pIID, int * pIndex ) -{ - - if(!_calc_CHECK_IID(0)) - { - *pIndex = 0; - return 1; - } - - return 0; -} - -const ExtendedProxyFileInfo calc_ProxyFileInfo = -{ - (PCInterfaceProxyVtblList *) & _calc_ProxyVtblList, - (PCInterfaceStubVtblList *) & _calc_StubVtblList, - (const PCInterfaceName * ) & _calc_InterfaceNamesList, - (const IID ** ) & _calc_BaseIIDList, - & _calc_IID_Lookup, - 1, - 2, - 0, /* table of [async_uuid] interfaces */ - 0, /* Filler1 */ - 0, /* Filler2 */ - 0 /* Filler3 */ -}; -#if _MSC_VER >= 1200 -#pragma warning(pop) -#endif - - -#endif /* !defined(_M_IA64) && !defined(_M_AMD64)*/ - - - -/* this ALWAYS GENERATED file contains the proxy stub code */ - - - /* File created by MIDL compiler version 6.00.0361 */ -/* at Thu Jan 24 22:09:58 2008 - */ -/* Compiler settings for d:\examples\OleCalc\calc.idl: - Oicf, W1, Zp8, env=Win64 (32b run,appending) - protocol : dce , ms_ext, c_ext, robust - 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_AMD64) - - -#pragma warning( disable: 4049 ) /* more than 64k source lines */ -#if _MSC_VER >= 1200 -#pragma warning(push) -#endif - -#pragma warning( disable: 4211 ) /* redefine extent to static */ -#pragma warning( disable: 4232 ) /* dllimport identity*/ -#define USE_STUBLESS_PROXY - - -/* verify that the version is high enough to compile this file*/ -#ifndef __REDQ_RPCPROXY_H_VERSION__ -#define __REQUIRED_RPCPROXY_H_VERSION__ 475 -#endif - - -#include "rpcproxy.h" -#ifndef __RPCPROXY_H_VERSION__ -#error this stub requires an updated version of -#endif // __RPCPROXY_H_VERSION__ - - -#include "calc_idl.h" - -#define TYPE_FORMAT_STRING_SIZE 57 -#define PROC_FORMAT_STRING_SIZE 147 -#define TRANSMIT_AS_TABLE_SIZE 0 -#define WIRE_MARSHAL_TABLE_SIZE 1 - -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; - - -static RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax = -{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}; - - -extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString; -extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString; - - -extern const MIDL_STUB_DESC Object_StubDesc; - - -extern const MIDL_SERVER_INFO ICalculator_ServerInfo; -extern const MIDL_STUBLESS_PROXY_INFO ICalculator_ProxyInfo; - - -extern const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[ WIRE_MARSHAL_TABLE_SIZE ]; - -#if !defined(__RPC_WIN64__) -#error Invalid build platform for this stub. -#endif - -static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString = - { - 0, - { - - /* Procedure get_Input */ - - 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 2 */ NdrFcLong( 0x0 ), /* 0 */ -/* 6 */ NdrFcShort( 0x7 ), /* 7 */ -/* 8 */ NdrFcShort( 0x18 ), /* ia64 Stack size/offset = 24 */ -/* 10 */ NdrFcShort( 0x0 ), /* 0 */ -/* 12 */ NdrFcShort( 0x8 ), /* 8 */ -/* 14 */ 0x45, /* Oi2 Flags: srv must size, has return, has ext, */ - 0x2, /* 2 */ -/* 16 */ 0xa, /* 10 */ - 0x3, /* Ext Flags: new corr desc, clt corr check, */ -/* 18 */ NdrFcShort( 0x1 ), /* 1 */ -/* 20 */ NdrFcShort( 0x0 ), /* 0 */ -/* 22 */ NdrFcShort( 0x0 ), /* 0 */ -/* 24 */ NdrFcShort( 0x0 ), /* 0 */ - - /* Parameter _value */ - -/* 26 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -/* 28 */ NdrFcShort( 0x8 ), /* ia64 Stack size/offset = 8 */ -/* 30 */ NdrFcShort( 0x20 ), /* Type Offset=32 */ - - /* Return value */ - -/* 32 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 34 */ NdrFcShort( 0x10 ), /* ia64 Stack size/offset = 16 */ -/* 36 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure put_Input */ - -/* 38 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 40 */ NdrFcLong( 0x0 ), /* 0 */ -/* 44 */ NdrFcShort( 0x8 ), /* 8 */ -/* 46 */ NdrFcShort( 0x18 ), /* ia64 Stack size/offset = 24 */ -/* 48 */ NdrFcShort( 0x0 ), /* 0 */ -/* 50 */ NdrFcShort( 0x8 ), /* 8 */ -/* 52 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ - 0x2, /* 2 */ -/* 54 */ 0xa, /* 10 */ - 0x5, /* Ext Flags: new corr desc, srv corr check, */ -/* 56 */ NdrFcShort( 0x0 ), /* 0 */ -/* 58 */ NdrFcShort( 0x1 ), /* 1 */ -/* 60 */ NdrFcShort( 0x0 ), /* 0 */ -/* 62 */ NdrFcShort( 0x0 ), /* 0 */ - - /* Parameter _value */ - -/* 64 */ NdrFcShort( 0x8b ), /* Flags: must size, must free, in, by val, */ -/* 66 */ NdrFcShort( 0x8 ), /* ia64 Stack size/offset = 8 */ -/* 68 */ NdrFcShort( 0x2e ), /* Type Offset=46 */ - - /* Return value */ - -/* 70 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 72 */ NdrFcShort( 0x10 ), /* ia64 Stack size/offset = 16 */ -/* 74 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure Calculate */ - -/* 76 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 78 */ NdrFcLong( 0x0 ), /* 0 */ -/* 82 */ NdrFcShort( 0x9 ), /* 9 */ -/* 84 */ NdrFcShort( 0x10 ), /* ia64 Stack size/offset = 16 */ -/* 86 */ NdrFcShort( 0x0 ), /* 0 */ -/* 88 */ NdrFcShort( 0x8 ), /* 8 */ -/* 90 */ 0x44, /* Oi2 Flags: has return, has ext, */ - 0x1, /* 1 */ -/* 92 */ 0xa, /* 10 */ - 0x1, /* Ext Flags: new corr desc, */ -/* 94 */ NdrFcShort( 0x0 ), /* 0 */ -/* 96 */ NdrFcShort( 0x0 ), /* 0 */ -/* 98 */ NdrFcShort( 0x0 ), /* 0 */ -/* 100 */ NdrFcShort( 0x0 ), /* 0 */ - - /* Return value */ - -/* 102 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 104 */ NdrFcShort( 0x8 ), /* ia64 Stack size/offset = 8 */ -/* 106 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - /* Procedure get_Output */ - -/* 108 */ 0x33, /* FC_AUTO_HANDLE */ - 0x6c, /* Old Flags: object, Oi2 */ -/* 110 */ NdrFcLong( 0x0 ), /* 0 */ -/* 114 */ NdrFcShort( 0xa ), /* 10 */ -/* 116 */ NdrFcShort( 0x18 ), /* ia64 Stack size/offset = 24 */ -/* 118 */ NdrFcShort( 0x0 ), /* 0 */ -/* 120 */ NdrFcShort( 0x8 ), /* 8 */ -/* 122 */ 0x45, /* Oi2 Flags: srv must size, has return, has ext, */ - 0x2, /* 2 */ -/* 124 */ 0xa, /* 10 */ - 0x3, /* Ext Flags: new corr desc, clt corr check, */ -/* 126 */ NdrFcShort( 0x1 ), /* 1 */ -/* 128 */ NdrFcShort( 0x0 ), /* 0 */ -/* 130 */ NdrFcShort( 0x0 ), /* 0 */ -/* 132 */ NdrFcShort( 0x0 ), /* 0 */ - - /* Parameter value */ - -/* 134 */ NdrFcShort( 0x2113 ), /* Flags: must size, must free, out, simple ref, srv alloc size=8 */ -/* 136 */ NdrFcShort( 0x8 ), /* ia64 Stack size/offset = 8 */ -/* 138 */ NdrFcShort( 0x20 ), /* Type Offset=32 */ - - /* Return value */ - -/* 140 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ -/* 142 */ NdrFcShort( 0x10 ), /* ia64 Stack size/offset = 16 */ -/* 144 */ 0x8, /* FC_LONG */ - 0x0, /* 0 */ - - 0x0 - } - }; - -static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString = - { - 0, - { - NdrFcShort( 0x0 ), /* 0 */ -/* 2 */ - 0x11, 0x4, /* FC_RP [alloced_on_stack] */ -/* 4 */ NdrFcShort( 0x1c ), /* Offset= 28 (32) */ -/* 6 */ - 0x13, 0x0, /* FC_OP */ -/* 8 */ NdrFcShort( 0xe ), /* Offset= 14 (22) */ -/* 10 */ - 0x1b, /* FC_CARRAY */ - 0x1, /* 1 */ -/* 12 */ NdrFcShort( 0x2 ), /* 2 */ -/* 14 */ 0x9, /* Corr desc: FC_ULONG */ - 0x0, /* */ -/* 16 */ NdrFcShort( 0xfffc ), /* -4 */ -/* 18 */ NdrFcShort( 0x1 ), /* Corr flags: early, */ -/* 20 */ 0x6, /* FC_SHORT */ - 0x5b, /* FC_END */ -/* 22 */ - 0x17, /* FC_CSTRUCT */ - 0x3, /* 3 */ -/* 24 */ NdrFcShort( 0x8 ), /* 8 */ -/* 26 */ NdrFcShort( 0xfff0 ), /* Offset= -16 (10) */ -/* 28 */ 0x8, /* FC_LONG */ - 0x8, /* FC_LONG */ -/* 30 */ 0x5c, /* FC_PAD */ - 0x5b, /* FC_END */ -/* 32 */ 0xb4, /* FC_USER_MARSHAL */ - 0x83, /* 131 */ -/* 34 */ NdrFcShort( 0x0 ), /* 0 */ -/* 36 */ NdrFcShort( 0x8 ), /* 8 */ -/* 38 */ NdrFcShort( 0x0 ), /* 0 */ -/* 40 */ NdrFcShort( 0xffde ), /* Offset= -34 (6) */ -/* 42 */ - 0x12, 0x0, /* FC_UP */ -/* 44 */ NdrFcShort( 0xffea ), /* Offset= -22 (22) */ -/* 46 */ 0xb4, /* FC_USER_MARSHAL */ - 0x83, /* 131 */ -/* 48 */ NdrFcShort( 0x0 ), /* 0 */ -/* 50 */ NdrFcShort( 0x8 ), /* 8 */ -/* 52 */ NdrFcShort( 0x0 ), /* 0 */ -/* 54 */ NdrFcShort( 0xfff4 ), /* Offset= -12 (42) */ - - 0x0 - } - }; - -static const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[ WIRE_MARSHAL_TABLE_SIZE ] = - { - - { - BSTR_UserSize - ,BSTR_UserMarshal - ,BSTR_UserUnmarshal - ,BSTR_UserFree - } - - }; - - - -/* Object interface: IUnknown, ver. 0.0, - GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */ - - -/* Object interface: IDispatch, ver. 0.0, - GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */ - - -/* Object interface: ICalculator, ver. 0.0, - GUID={0x2CFA5DB2,0xA740,0x11d3,{0x98,0x1C,0x00,0x00,0x00,0x00,0x00,0x00}} */ - -#pragma code_seg(".orpc") -static const unsigned short ICalculator_FormatStringOffsetTable[] = - { - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - (unsigned short) -1, - 0, - 38, - 76, - 108 - }; - -static const MIDL_STUBLESS_PROXY_INFO ICalculator_ProxyInfo = - { - &Object_StubDesc, - __MIDL_ProcFormatString.Format, - &ICalculator_FormatStringOffsetTable[-3], - 0, - 0, - 0 - }; - - -static const MIDL_SERVER_INFO ICalculator_ServerInfo = - { - &Object_StubDesc, - 0, - __MIDL_ProcFormatString.Format, - &ICalculator_FormatStringOffsetTable[-3], - 0, - 0, - 0, - 0}; -CINTERFACE_PROXY_VTABLE(11) _ICalculatorProxyVtbl = -{ - &ICalculator_ProxyInfo, - &IID_ICalculator, - IUnknown_QueryInterface_Proxy, - IUnknown_AddRef_Proxy, - IUnknown_Release_Proxy , - 0 /* (void *) (INT_PTR) -1 /* IDispatch::GetTypeInfoCount */ , - 0 /* (void *) (INT_PTR) -1 /* IDispatch::GetTypeInfo */ , - 0 /* (void *) (INT_PTR) -1 /* IDispatch::GetIDsOfNames */ , - 0 /* IDispatch_Invoke_Proxy */ , - (void *) (INT_PTR) -1 /* ICalculator::get_Input */ , - (void *) (INT_PTR) -1 /* ICalculator::put_Input */ , - (void *) (INT_PTR) -1 /* ICalculator::Calculate */ , - (void *) (INT_PTR) -1 /* ICalculator::get_Output */ -}; - - -static const PRPC_STUB_FUNCTION ICalculator_table[] = -{ - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - STUB_FORWARDING_FUNCTION, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2, - NdrStubCall2 -}; - -CInterfaceStubVtbl _ICalculatorStubVtbl = -{ - &IID_ICalculator, - &ICalculator_ServerInfo, - 11, - &ICalculator_table[-3], - CStdStubBuffer_DELEGATING_METHODS -}; - -static const MIDL_STUB_DESC Object_StubDesc = - { - 0, - NdrOleAllocate, - NdrOleFree, - 0, - 0, - 0, - 0, - 0, - __MIDL_TypeFormatString.Format, - 1, /* -error bounds_check flag */ - 0x50002, /* Ndr library version */ - 0, - 0x6000169, /* MIDL Version 6.0.361 */ - 0, - UserMarshalRoutines, - 0, /* notify & notify_flag routine table */ - 0x1, /* MIDL flag */ - 0, /* cs routines */ - 0, /* proxy/server info */ - 0 /* Reserved5 */ - }; - -const CInterfaceProxyVtbl * _calc_ProxyVtblList[] = -{ - ( CInterfaceProxyVtbl *) &_ICalculatorProxyVtbl, - 0 -}; - -const CInterfaceStubVtbl * _calc_StubVtblList[] = -{ - ( CInterfaceStubVtbl *) &_ICalculatorStubVtbl, - 0 -}; - -PCInterfaceName const _calc_InterfaceNamesList[] = -{ - "ICalculator", - 0 -}; - -const IID * _calc_BaseIIDList[] = -{ - &IID_IDispatch, - 0 -}; - - -#define _calc_CHECK_IID(n) IID_GENERIC_CHECK_IID( _calc, pIID, n) - -int __stdcall _calc_IID_Lookup( const IID * pIID, int * pIndex ) -{ - - if(!_calc_CHECK_IID(0)) - { - *pIndex = 0; - return 1; - } - - return 0; -} - -const ExtendedProxyFileInfo calc_ProxyFileInfo = -{ - (PCInterfaceProxyVtblList *) & _calc_ProxyVtblList, - (PCInterfaceStubVtblList *) & _calc_StubVtblList, - (const PCInterfaceName * ) & _calc_InterfaceNamesList, - (const IID ** ) & _calc_BaseIIDList, - & _calc_IID_Lookup, - 1, - 2, - 0, /* table of [async_uuid] interfaces */ - 0, /* Filler1 */ - 0, /* Filler2 */ - 0 /* Filler3 */ -}; -#if _MSC_VER >= 1200 -#pragma warning(pop) -#endif - - -#endif /* defined(_M_IA64) || defined(_M_AMD64)*/ diff --git a/archive/OleCalc/dlldata.c b/archive/OleCalc/dlldata.c deleted file mode 100644 index b4b1678c0..000000000 --- a/archive/OleCalc/dlldata.c +++ /dev/null @@ -1,38 +0,0 @@ -/********************************************************* - DllData file -- generated by MIDL compiler - - DO NOT ALTER THIS FILE - - This file is regenerated by MIDL on every IDL file compile. - - To completely reconstruct this file, delete it and rerun MIDL - on all the IDL files in this DLL, specifying this file for the - /dlldata command line option - -*********************************************************/ - -#define PROXY_DELEGATION - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -EXTERN_PROXY_FILE( calc ) - - -PROXYFILE_LIST_START -/* Start of list */ - REFERENCE_PROXY_FILE( calc ), -/* End of list */ -PROXYFILE_LIST_END - - -DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID ) - -#ifdef __cplusplus -} /*extern "C" */ -#endif - -/* end of generated dlldata file */ diff --git a/archive/PaintGL/Copying b/archive/PaintGL/Copying deleted file mode 100644 index 82aabaae4..000000000 --- a/archive/PaintGL/Copying +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 2021, The U++ Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted -provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other materials provided - with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/archive/PaintGL/PaintGL.cpp b/archive/PaintGL/PaintGL.cpp deleted file mode 100644 index e40ba1f22..000000000 --- a/archive/PaintGL/PaintGL.cpp +++ /dev/null @@ -1,98 +0,0 @@ -#include "PaintGL.h" - -#pragma comment( lib, "opengl32.lib" ) // Search For OpenGL32.lib While Linking -#pragma comment( lib, "glu32.lib" ) // Search For GLu32.lib While Linking -#pragma comment( lib, "glaux.lib" ) // Search For GLaux.lib While Linking - -PaintGL::PaintGL() -{ - size = Null; - hbmp = ohbmp = NULL; - hdc = NULL; - hrc = NULL; -} - -PaintGL::~PaintGL() -{ - Free(); -} - -void PaintGL::Free() -{ - if(hrc) { - wglMakeCurrent(NULL, NULL); - wglDeleteContext(hrc); - SelectObject(hdc, ohbmp); - DeleteDC(hdc); - DeleteObject(hbmp); - hrc = NULL; - hbmp = ohbmp = NULL; - hdc = NULL; - hbmp = NULL; - } - size = Null; -} - - -void PaintGL::Init(Size sz) { - Free(); - - size = sz; - - BITMAPINFOHEADER bih; - memset(&bih, 0, sizeof(bih)); - bih.biSize = sizeof(bih); - bih.biWidth = ((((int) sz.cx * 8) + 31) & ~31) >> 3; - bih.biHeight = sz.cy; - bih.biPlanes = 1; - bih.biBitCount = 32; - bih.biCompression = BI_RGB; - - hdc = CreateCompatibleDC(NULL); - - void *dummy; - - hbmp = CreateDIBSection(hdc, (BITMAPINFO*)&bih, DIB_PAL_COLORS, &dummy, NULL, 0); - - ohbmp = (HBITMAP)SelectObject(hdc, hbmp); - - PIXELFORMATDESCRIPTOR pfd; - memset(&pfd, 0, sizeof(pfd)); - pfd.nSize = sizeof(pfd); - pfd.nVersion = 1; - pfd.dwFlags = PFD_DRAW_TO_BITMAP | PFD_SUPPORT_OPENGL/* | PFD_SUPPORT_GDI | PFD_ACCELERATED*/; - pfd.iPixelType = PFD_TYPE_RGBA; - pfd.cColorBits = 32; - pfd.cDepthBits = 32; - pfd.iLayerType = PFD_MAIN_PLANE; - - GLuint PixelFormat = ChoosePixelFormat(hdc, &pfd); - SetPixelFormat(hdc, PixelFormat, &pfd); - hrc = wglCreateContext(hdc); - wglMakeCurrent(hdc, hrc); - - glShadeModel(GL_SMOOTH); - glClearColor(0.0f, 0.0f, 0.0f, 0.5f); - glClearDepth(1.0f); - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LEQUAL); - glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); - - glViewport(0, 0, (GLsizei)sz.cx, (GLsizei)sz.cy); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(45.0f, (GLfloat)(sz.cx)/(GLfloat)(sz.cy), 1.0f, 100.0f); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -} - -void PaintGL::Paint(Draw& w, const Rect& r, Callback gl) -{ - if(r.Size() != size) - Init(r.Size()); - gl(); - glFlush(); - HDC whdc = w.BeginGdi(); - BitBlt(whdc, 0, 0, size.cx, size.cy, hdc, r.left, r.top, SRCCOPY); - w.EndGdi(); -} diff --git a/archive/PaintGL/PaintGL.h b/archive/PaintGL/PaintGL.h deleted file mode 100644 index 2ac78de9c..000000000 --- a/archive/PaintGL/PaintGL.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _PaintGL_PaintGL_h -#define _PaintGL_PaintGL_h - -#include - -#include -#include -#include - -class PaintGL { - Size size; - HBITMAP hbmp, ohbmp; - HDC hdc; - HGLRC hrc; - - void Free(); - void Init(Size sz); - -public: - void Paint(Draw& w, const Rect& r, Callback gl); - - PaintGL(); - ~PaintGL(); -}; - - -#endif diff --git a/archive/PaintGL/PaintGL.upp b/archive/PaintGL/PaintGL.upp deleted file mode 100644 index 0c93bd5b7..000000000 --- a/archive/PaintGL/PaintGL.upp +++ /dev/null @@ -1,6 +0,0 @@ -file - PaintGL.h, - PaintGL.cpp, - Info readonly separator, - Copying; - diff --git a/archive/RichBook/RichBook.cpp b/archive/RichBook/RichBook.cpp deleted file mode 100644 index 8ab6caeee..000000000 --- a/archive/RichBook/RichBook.cpp +++ /dev/null @@ -1,677 +0,0 @@ -#include "RichBook.h" - -#include -#include - -namespace Upp { - -struct FieldTypeVarCls : public RichPara::FieldType -{ - virtual Array Evaluate(const String& param, VectorMap& vars, - const RichPara::CharFormat& fmt); -}; - -Array FieldTypeVarCls::Evaluate(const String& dest, - VectorMap& vars, const RichPara::CharFormat& linkfmt) -{ - RichPara para; - RichPara::CharFormat fmt = linkfmt; - int f = vars.Find(dest); - if(f < 0) { - fmt.ink = LtRed(); - fmt.paper = WhiteGray(); - para.Cat(dest, fmt); - } - else - para.Cat(StdFormat(vars[f]), fmt); - return para.part; -} - -RichPara::FieldType& GLOBAL_V(FieldTypeVarCls, FieldTypeVar); - -Id FieldTypeVarID() -{ - static Id ftv("VAR"); - return ftv; -} - -INITBLOCK { - RichPara::Register(FieldTypeVarID(), FieldTypeVar()); -} - -/* -RichPara::FieldType& FieldTypeIndexEntry() -{ -} - -Id FieldTypeIndexEntryID() -{ -} - -String EncodeIndexEntry(const RichIndexEntry& idx) -{ -} - -RichIndexEntry DecodeIndexEntry(String encoded_indexentry) -{ -} -*/ - -RichBookSection::RichBookSection() -{ -// pagesize = pg; - columns = 1; - firstpage = 1; - margin = Rect(0, 0, 0, 0); - header_space = 200; - footer_space = 200; - column_space = 200; -// footer[1] = "- # -"; -} - -Rect RichBookSection::GetPageRect(Size pagesize) const -{ - return Rect(pagesize).Deflated(margin); -} - -Rect RichBookSection::GetTextRect(Size pagesize, int colindex) const -{ - Rect textarea = GetPageRect(pagesize).Deflated(0, header_space, 0, footer_space); - if(columns <= 1) - return textarea; - int colwd = (textarea.Width() - column_space * (columns - 1)) / columns; - int offset = iscale(textarea.Width() - colwd, colindex, columns - 1); - textarea.left += offset; - textarea.right = textarea.left + colwd; - return textarea; -} - -Size RichBookSection::GetTextSize(Size pagesize) const -{ - return GetTextRect(pagesize, 0).Size(); -} - -class RichSectionPageDraw : public PageDraw -{ -public: - RichSectionPageDraw(Size drawingsize, Gate2 progress, int& progress_pos); - - virtual Draw& Page(int page); - virtual Draw& Info(); - - Vector Close(); - -private: - Gate2 progress; - int& progress_pos; - Size drawingsize; - Vector pages; - DrawingDraw ddraw; - DrawingDraw info; - int currentpage; -}; - -RichSectionPageDraw::RichSectionPageDraw(Size dsz, Gate2 progress, int& progress_pos) -: progress(progress) -, progress_pos(progress_pos) -{ - currentpage = -1; - info.Create(drawingsize = dsz); -} - -Draw& RichSectionPageDraw::Page(int page) -{ - if(page != currentpage) { - ASSERT(ddraw.GetCloffLevel() == 0); - progress(progress_pos + page, -1); - if(currentpage >= 0) - pages.At(currentpage) = ddraw; - ddraw.Create(drawingsize); - ddraw.DrawDrawing(drawingsize, pages.At(currentpage = page)); - } - return ddraw; -} - -Draw& RichSectionPageDraw::Info() -{ - return Page(0); -} - -Vector RichSectionPageDraw::Close() -{ - if(currentpage >= 0) { - ASSERT(ddraw.GetCloffLevel() == 0); - pages.At(currentpage) = ddraw; - } - return pages; -} - -static String ExpandHFText(const char *text, int pageno) -{ - String out; - for(char c; c = *text++;) - if(c == '#') - switch(*text++) { - case 'r': out.Cat(FormatIntRoman(pageno, false)); break; - case 'R': out.Cat(FormatIntRoman(pageno, true)); break; - case 'a': out.Cat(FormatIntAlpha(pageno, false)); break; - case 'A': out.Cat(FormatIntAlpha(pageno, true)); break; - default: text--; out.Cat(FormatInt(pageno)); break; - } - else - out.Cat(c); - return out; -} - -Vector RichPrintSection::Print(Size pagesize, Gate2 progress, int& progress_pos) const -{ - ASSERT(columns > 0); - Size drawingsize = GetTextSize(pagesize); - RichSectionPageDraw spdraw(drawingsize, progress, progress_pos); - PaintInfo paintinfo; - paintinfo.top = PageY(0, 0); - paintinfo.bottom = PageY(32767, 0); - paintinfo.indexentry = Null; - text.Paint(spdraw, drawingsize, paintinfo); - Vector in = spdraw.Close(); - Vector out; - for(int i = 0; i < in.GetCount(); i += columns) { - int pageno = firstpage + out.GetCount(); - DrawingDraw ddraw(pagesize); - Rect pagerect = GetPageRect(pagesize); - for(int c = 0; c < columns && c + i < in.GetCount(); c++) - ddraw.DrawDrawing(GetTextRect(pagesize, c), in[i + c]); - for(int hf = 0; hf < 3; hf++) { - if(!IsNull(header[hf])) { - String s = ExpandHFText(header[hf], pageno); - Size sz = UPP::GetTextSize(s, charformat); - int x; - switch(hf) { - case 0: x = pagerect.left; break; - case 1: x = (pagerect.left + pagerect.right - sz.cx) >> 1; break; - case 2: x = pagerect.right - sz.cx; break; - } - ddraw.DrawText(x, pagerect.top, s, charformat); - } - if(!IsNull(footer[hf])) { - String s = ExpandHFText(footer[hf], pageno); - Size sz = UPP::GetTextSize(s, charformat); - int x; - switch(hf) { - case 0: x = pagerect.left; break; - case 1: x = (pagerect.left + pagerect.right - sz.cx) >> 1; break; - case 2: x = pagerect.right - sz.cx; break; - } - ddraw.DrawText(x, pagerect.bottom - sz.cy, s, charformat); - } - } - out.Add() = ddraw; - } - return out; -} - -String GetLangSuffix(int language = GetCurrentLanguage()) -{ - String lt = LNGAsText(language); - String out; - out << '$' << (char)ToLower(lt[0]) << (char)ToLower(lt[1]) << '-' << (char)ToLower(lt[3]) << (char)ToLower(lt[4]); - return out; -} - -void MakeStdToc(RichText& out, const RichToc& toc, int print_width) -{ - VectorMap< String, ArrayMap > subparts; - String suffix = GetLangSuffix(); - for(int i = 0; i < toc.entries.GetCount(); i++) { - const RichTocEntry& e = toc.entries[i]; - RichPara::Format pfmt = out.GetStyle(out.GetStyleId("Toc" + FormatInt(e.level))).format; - RichPara para; - para.format = pfmt; - WString name = e.text; - String tname = e.topic, subpart; - int th = tname.Find('#'); - if(th >= 0) { - subpart = tname.Mid(th); - tname.Trim(th); - } - tname.Cat(suffix); - Topic tp = GetTopic(tname); - if(!IsNull(name)) - para.Cat(name, pfmt); - else { - if(!IsNull(subpart)) { - int sp = subparts.Find(tname); - if(sp < 0) { - sp = subparts.GetCount(); - ArrayMap& spmap = subparts.Add(tname); - RichText rt = ParseQTF(tp.text); - for(int p = 0; p < rt.GetPartCount(); p++) - if(rt.IsPara(p)) { - RichPara rp = rt.Get(p); -// if(*rp.format.label == '#') - spmap.AddPick("#" + rp.format.label, rp); - } - } - para <<= subparts[sp].Get(subpart, RichPara()); - Array objs; - String packed = para.Pack(para.format, objs); - para.Unpack(packed, objs, pfmt); - } - else if(!IsNull(tp.title)) - para.Cat(FromUtf8(tp.title), pfmt); - } - if(para.part.IsEmpty()) { - pfmt.ink = LtRed(); - pfmt.paper = WhiteGray(); - para.Cat((WString)(tname + subpart), pfmt); - } - para.Cat("\t", pfmt); - para.Cat(FieldTypeVarID(), String().Cat() << tname << subpart << "$page", pfmt); - out.Cat(para); - } - RLOG("MakeStdToc:\n" << AsQTF(out)); -} - -void MakeOnlineToc(RichText& out, const RichToc& toc) -{ - String suffix = GetLangSuffix(); - VectorMap< String, ArrayMap > subparts; - for(int i = 0; i < toc.entries.GetCount(); i++) { - const RichTocEntry& e = toc.entries[i]; - RichPara::Format pfmt = out.GetStyle(out.GetStyleId("Topics" + FormatInt(e.level))).format; - RichPara para; - para.format = pfmt; - WString name = e.text; - String tname = e.topic, subpart; - int th = tname.Find('#'); - if(th >= 0) { - subpart = tname.Mid(th); - tname.Trim(th); - } - tname.Cat(suffix); - Topic tp = GetTopic(tname); - pfmt.link = tname; - if(!IsNull(name)) - para.Cat(name, pfmt); - else { - if(!IsNull(subpart)) { - int sp = subparts.Find(tname); - if(sp < 0) { - sp = subparts.GetCount(); - ArrayMap& spmap = subparts.Add(tname); - RichText rt = ParseQTF(tp.text); - for(int p = 0; p < rt.GetPartCount(); p++) - if(rt.IsPara(p)) { - RichPara rp = rt.Get(p); -// if(*rp.format.label == '#') - spmap.AddPick("#" + rp.format.label, rp); - } - } - para <<= subparts[sp].Get(subpart, RichPara()); - Array objs; - String packed = para.Pack(para.format, objs); - para.Unpack(packed, objs, pfmt); - } - else if(!IsNull(tp.title)) - para.Cat(FromUtf8(tp.title), pfmt); - } - if(para.part.IsEmpty()) { - pfmt.ink = LtRed(); - pfmt.paper = WhiteGray(); - para.Cat((WString)(tname + subpart), pfmt); - } - out.Cat(para); - } - RLOG("MakeOnlineToc:\n" << AsQTF(out)); -} - -void MakeTocTopics(RichText& out, const RichToc& toc) -{ - String suffix = GetLangSuffix(); - VectorMap< String, VectorMap > topic_tocrefs; - for(int i = 0; i < toc.entries.GetCount(); i++) { - String tname = toc.entries[i].topic; - int th = tname.Find('#'); - if(th >= 0) - topic_tocrefs.GetAdd(tname.Left(th)).GetAdd(tname.Mid(th), i); - } - Index done; - for(int i = 0; i < toc.entries.GetCount(); i++) { - const RichTocEntry& e = toc.entries[i]; - WString name = e.text; - String tname = e.topic; - int th = tname.Find('#'); - if(th >= 0) - tname.Trim(th); - int tr = topic_tocrefs.Find(tname); - tname << suffix; - if(done.Find(tname) >= 0) - continue; - done.Add(tname); - Topic tp = GetTopic(tname); - RichPara title_para; - title_para.format = out.GetStyle(out.GetStyleId("Heading" + FormatInt(e.level))).format; - if(IsNull(name) && IsNull(name = FromUtf8(tp.title))) { - name = (WString)tname; - title_para.format.ink = LtRed(); - title_para.format.paper = WhiteGray(); - } - title_para.format.label = tname; - title_para.Cat(name, title_para.format); - out.Cat(title_para); - RichText data = ParseQTF(tp.text); - int pcount = out.GetPartCount(); - out.CatPick(data); - for(int t = pcount; t < out.GetPartCount(); t++) - if(out.IsPara(t)) { - RichPara p = out.Get(t); - String lbl = "#" + p.format.label; - int tx; - if(tr >= 0 && (tx = topic_tocrefs[tr].Find(lbl)) >= 0) { - const RichTocEntry& ex = toc.entries[topic_tocrefs[tr][tx]]; - Array objs; - String pack = p.Pack(p.format, objs); - p.format = out.GetStyle(out.GetStyleId("Heading" + FormatInt(ex.level))).format; - p.Unpack(pack, objs, p.format); - p.format.label = tname + lbl; - out.Set(t, p, out.GetStyles()); - } - } - } -} - -//RichText MakeStdIndex( - -RichBook::RichBook(Size pg) -: page_size(pg) -{ - RichStyle toc1, toc2, toc3, toc4; - RichPara::Tab& t1tab = toc1.format.tab.Add(); - t1tab.pos = pg.cx - 300; - t1tab.align = ALIGN_RIGHT; - t1tab.fillchar = 1; - toc2 = toc3 = toc4 = toc1; - t1tab.fillchar = 0; - - toc1.name = "Toc1"; - (Font&)toc1.format = Arial(90).Bold(); - toc1.format.indent = 100; - toc1.format.before = 100; - toc1.format.number[0] = RichPara::NUMBER_1; - - toc2.name = "Toc2"; - (Font&)toc2.format = Arial(84).Bold(); - toc2.format.indent = 200; - toc2.format.lm = 200; - toc2.format.number[0] = toc2.format.number[1] = RichPara::NUMBER_1; - - toc3.name = "Toc3"; - (Font&)toc3.format = Arial(84); - toc3.format.indent = 300; - toc3.format.lm = 300; - toc3.format.number[0] = toc3.format.number[1] = toc3.format.number[2] = RichPara::NUMBER_1; - - toc4.name = "Toc4"; - toc4.format.number[0] = toc4.format.number[1] = toc4.format.number[2] = toc4.format.number[3] = RichPara::NUMBER_1; - - RichStyle head1, head2, head3, head4; - head1.name = "Heading1"; - (Font&)head1.format = Arial(144).Bold(); - head1.format.newpage = true; - head1.format.before = 300; - head1.format.after = 100; - head1.format.indent = 150; - head1.format.number[0] = RichPara::NUMBER_1; - - head2.name = "Heading2"; - (Font&)head2.format = Arial(120).Bold(); - head2.format.before = 200; - head2.format.after = 100; - head2.format.indent = 200; - head2.format.number[0] = head2.format.number[1] = RichPara::NUMBER_1; - - head3.name = "Heading3"; - (Font&)head3.format = Arial(100).Bold(); - head3.format.before = 100; - head3.format.after = 50; - head3.format.indent = 250; - head3.format.number[0] = head3.format.number[1] = head3.format.number[2] = RichPara::NUMBER_1; - - head4 = head3; - head4.name = "Heading4"; - head4.format.number[0] = head4.format.number[1] = head4.format.number[2] = head4.format.number[3] = RichPara::NUMBER_1; - - default_styles.Add(Uuid::Create(), toc1); - default_styles.Add(Uuid::Create(), toc2); - default_styles.Add(Uuid::Create(), toc3); - default_styles.Add(Uuid::Create(), toc4); - - default_styles.Add(Uuid::Create(), head1); - default_styles.Add(Uuid::Create(), head2); - default_styles.Add(Uuid::Create(), head3); - default_styles.Add(Uuid::Create(), head4); -} - -RichPrintSection& RichBook::AddSection() -{ - RichText init; - init.OverrideStyles(default_styles); - return sections.Add(new RichPrintSection(default_section, init)); -} - -Vector RichBook::Print(Size pagesize, Gate2 progress) -{ - Vector out; - int pos = 0; - - VectorMap vars; - vars.GetAdd("$book") = 1; - bool stable = false; - enum { MAX_PASSES = 10 }; - int pass; - for(pass = 1; !stable && pass <= MAX_PASSES; pass++) { - if(progress(pass, 0)) - throw AbortExc(); - stable = true; - int pageno = 1; - Index chkdup; - for(int s = 0; s < sections.GetCount(); s++) { - RichPrintSection& psec = sections[s]; - if(psec.text.GetPartCount() > 0 && psec.text.IsPara(0)) { - RichPara p0 = psec.text.Get(0); - if(p0.format.newpage) { - p0.format.newpage = false; - psec.text.Set(0, p0, psec.text.GetStyles()); - } - } - Size textsize = psec.GetTextSize(pagesize); - PageY begin; - pageno = Nvl(psec.firstpage, pageno); - psec.text.EvaluateFields(vars); - int numpages = psec.text.GetHeight(textsize).page / psec.columns + 1; - Vector posinfo = psec.text.GetValPos(textsize, RichText::LABELS); - for(int i = 0; i < posinfo.GetCount(); i++) { - String key = posinfo[i].data.ToString() + "$page"; - if(chkdup.Find(key) >= 0) { - if(pass == 1) - RLOG("Duplicate: " << key); - continue; - } - chkdup.Add(key); - int oldpage = vars.Get(key, Value()); - int newpage = pageno + posinfo[i].py.page; - if(newpage != oldpage) { - if(pass > 2) - RLOG("Unstable: " << key << ": " << oldpage << " -> " << newpage); - vars.GetAdd(key) = newpage; - stable = false; - } - } - pageno += numpages; - } - } - for(int i = 0; i < sections.GetCount(); i++) - out.AppendPick(sections[i].Print(pagesize, progress, pos)); -#ifdef _DEBUG - RichText symtext; - Vector order = GetSortOrder(vars.GetKeys()); - for(int o = 0; o < order.GetCount(); o++) { - RichPara para; - para.Cat(NFormat("<%s> %vt", vars.GetKey(order[o]), vars[order[o]]), para.format); - symtext.Cat(para); - } - RichPrintSection symsec(default_section, symtext); - out.AppendPick(symsec.Print(pagesize, progress, pos)); -#endif - return out; -} - -void CreateHelpBook(RichBook& book) -{ - Progress progress(t_("Typesetting page %d...")); - DocReport report; - Vector pages = book.Print(report.GetPageSize(), progress); - progress.SetText(t_("Printing page %d...")); - for(int i = 0; i < pages.GetCount(); i++) { - if(progress.SetCanceled(i, pages.GetCount())) - throw AbortExc(); - if(i) - report.NextPage(); - report.DrawDrawing(pages[i].GetSize(), pages[i]); - } - report.Perform(); -} - -String CreateHelpPDF(RichBook& book) -{ - PdfDraw pdf(210 * 6000 / 254, 297 * 6000 / 254); - Rect margin = Rect(pdf.GetPagePixels()).Deflated(236); - Progress progress(t_("Typesetting...")); - Vector pages = book.Print(margin.Size(), progress); - progress.SetText(t_("Exporting PDF...")); - progress.SetTotal(pages.GetCount()); - for(int i = 0; i < pages.GetCount(); i++) { - if(progress.StepCanceled()) - throw AbortExc(); - pdf.StartPage(); - pdf.DrawDrawing(margin, pages[i]); - pdf.EndPage(); - } - return pdf.Finish(); -} - -String CreateHelpRTF(RichBook& book, byte charset) -{ - RichText richtext; - for(int i = 0; i < book.sections.GetCount(); i++) - richtext.CatPick(book.sections[i].text); - return EncodeRTF(richtext, charset); -} - -RichBookHtml::RichBookHtml() -{ -} - -void RichBookHtml::AddFile(String url, String data) -{ -} - -void RichBookHtml::AddImage(String url, String data) -{ -} - -String RichBookHtml::GetURLFile(String url) const -{ - String out; - return out; -} - -void CreateHelpHtml(RichBook& book, RichBookHtml& html) -{ -} - -GLOBAL_VAR(Callback1, DefaultBook) - -void CreateDefaultBook() -{ - RichBook book; - DefaultBook()(book); - CreateHelpBook(book); -} - -void CreateDefaultPDF() -{ - RichBook book; - DefaultBook()(book); - try { - String data = CreateHelpPDF(book); - FileSelector fsel; - fsel.Type(t_("PDF documents (*.pdf)"), "*.pdf") - .DefaultExt("pdf") - .AllFilesType(); - static String recent; - fsel <<= recent; - if(fsel.ExecuteSaveAs(t_("PDF export"))) { - recent = ~fsel; - if(!SaveFile(recent, data)) - throw Exc(NFormat("Error saving file '%s' (%d B).", recent, data.GetLength())); - } - } - catch(Exc e) { - ShowExc(e); - } -} - -void CreateDefaultRTF() -{ - RichBook book; - DefaultBook()(book); - try { - String data = CreateHelpRTF(book, GetDefaultCharset()); - FileSelector fsel; - fsel.Type(t_("Rich text documents (*.rtf)"), "*.rtf") - .DefaultExt("rtf") - .AllFilesType(); - static String recent; - fsel <<= recent; - if(fsel.ExecuteSaveAs(t_("Save manual as"))) { - recent = ~fsel; - if(!SaveFile(recent, data)) - throw Exc(NFormat("Error saving file '%s' (%d B).", recent, data.GetLength())); - } - } - catch(Exc e) { - ShowExc(e); - } -} - -void CreateDefaultHTML() -{ - RichBook book; - DefaultBook()(book); - try { - RichBookHtml html; - CreateHelpHtml(book, html); - } - catch(Exc e) { - ShowExc(e); - } -} - -void ManualMenu() -{ - MenuBar menu; - bool isdb = DefaultBook(); - menu.Add(isdb, t_("Print manual"), callback(&CreateDefaultBook)); - menu.Add(isdb, t_("PDF export"), callback(&CreateDefaultPDF)); - menu.Add(isdb, t_("RTF export"), callback(&CreateDefaultRTF)); - menu.Add(isdb, t_("HTML export"), callback(&CreateDefaultHTML)); - menu.Execute(); -} - -void HelpBookMenu(Bar& bar) -{ - bar.Add(t_("Save manual"), CtrlImg::save(), callback(&ManualMenu)); -} - -} diff --git a/archive/RichBook/RichBook.h b/archive/RichBook/RichBook.h deleted file mode 100644 index 15d9a96a3..000000000 --- a/archive/RichBook/RichBook.h +++ /dev/null @@ -1,134 +0,0 @@ -#ifndef _RichBook_RichBook_h -#define _RichBook_RichBook_h - -#include - -namespace Upp { - -RichPara::FieldType& FieldTypeVar(); -Id FieldTypeVarID(); - -class RichIndexEntry : DeepCopyOption -{ -public: - RichIndexEntry() {} - RichIndexEntry(const RichIndexEntry& rti, bool deep) : reflist(rti.reflist, deep) {} - -public: - Vector reflist; -}; - -RichPara::FieldType& FieldTypeIndexEntry(); -Id FieldTypeIndexEntryID(); -String EncodeIndexEntry(const RichIndexEntry& idx); -RichIndexEntry DecodeIndexEntry(String encoded_indexentry); - -class RichBookSection { -public: - RichBookSection(); - - Rect GetPageRect(Size pagesize) const; - Rect GetTextRect(Size pagesize, int columnindex) const; - Size GetTextSize(Size pagesize) const; - -public: - bool nested; - int columns; - int firstpage; - Rect margin; - int header_space; - int footer_space; - int column_space; - String header[3], footer[3]; - RichPara::CharFormat charformat; -}; - -class RichPrintSection : public RichBookSection { -public: - RichPrintSection(const RichBookSection& s, pick_ RichText& t) - : RichBookSection(s), text(t) {} - - Vector Print(Size pagesize, Gate2 progress, int& progress_pos) const; - -public: - RichText text; -}; - -class RichTocEntry { -public: - RichTocEntry(String topic = Null, int level = 1, bool numbered = true, bool appendix = false, WString text = Null) - : topic(topic), level(level), numbered(numbered), text(text) {} - - String topic; - int level; - bool numbered; - bool appendix; - WString text; -}; - -class RichToc : DeepCopyOption { -public: - RichToc() {} - RichToc(const RichToc& rtoc, int deep) : entries(rtoc.entries, deep) {} - - void Add(String topic, int level, bool numbered = true, bool appendix = false, WString text = Null) - { entries.Add(new RichTocEntry(topic, level, numbered, appendix, text)); } - - Array entries; -}; - -void MakeOnlineToc(RichText& out, const RichToc& toc); -void MakeStdToc(RichText& out, const RichToc& toc, int print_width); -void MakeTocTopics(RichText& out, const RichToc& toc); -//RichText MakeStdIndex( - -class RichBook { -public: - RichBook(Size page_size = Size(3968, 6074)); - - RichPrintSection& AddSection(); - - Vector Print(Size pagesize, Gate2 progress); - -public: - Size page_size; - RichBookSection default_section; - RichStyles default_styles; - enum { TOC_DEPTH = 4 }; - Array sections; -}; - -void CreateHelpBook(RichBook& book); -String CreateHelpPDF(RichBook& book); -String CreateHelpRTF(RichBook& book, byte charset); - -class RichBookHtml { -public: - RichBookHtml(); - - void AddFile(String url, String data); - void AddImage(String url, String data); - String GetURLFile(String url) const; - -public: - String output_path; - enum { STYLE_DEEP, STYLE_FLAT, STYLE_ONEFILE }; - int style; - VectorMap files; - VectorMap images; -}; - -void CreateHelpHtml(const RichBook& book, RichBookHtml& html); - -Callback1& DefaultBook(); - -void CreateDefaultBook(); -void CreateDefaultPDF(); -void CreateDefaultRTF(); -void CreateDefaultHTML(); - -void HelpBookMenu(Bar& bar); - -} - -#endif diff --git a/archive/RichBook/RichBook.t b/archive/RichBook/RichBook.t deleted file mode 100644 index 2bfa537ab..000000000 --- a/archive/RichBook/RichBook.t +++ /dev/null @@ -1,38 +0,0 @@ - -// RichBook.cpp - -T_("Typesetting page %d...") -csCZ("Sázím stranu %d...") - -T_("Printing page %d...") -csCZ("Tisknu stranu %d...") - -T_("Typesetting...") -csCZ("Sázím...") - -T_("Exporting PDF...") -csCZ("Exportuji PDF...") - -T_("PDF documents (*.pdf)") -csCZ("Dokumenty PDF (*.pdf)") - -T_("PDF export") -csCZ("Export PDF") - -T_("Rich text documents (*.rtf)") -csCZ("Dokumenty Rich text (*.rtf)") - -T_("Save manual as") -csCZ("Uložit pøíruèku jako") - -T_("Print manual") -csCZ("Tisk pøíruèky") - -T_("RTF export") -csCZ("Export do RTF") - -T_("HTML export") -csCZ("Export do HTML") - -T_("Save manual") -csCZ("Uložit pøíruèku") diff --git a/archive/RichBook/RichBook.upp b/archive/RichBook/RichBook.upp deleted file mode 100644 index 1434e3afc..000000000 --- a/archive/RichBook/RichBook.upp +++ /dev/null @@ -1,9 +0,0 @@ -uses - RichText, - CtrlLib; - -file - RichBook.h, - RichBook_init.icpp, - RichBook.t, - RichBook.cpp; diff --git a/archive/RichBook/RichBook_init.icpp b/archive/RichBook/RichBook_init.icpp deleted file mode 100644 index cad4d0d72..000000000 --- a/archive/RichBook/RichBook_init.icpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "RichBook.h" - -namespace Upp { - -#define TFILE -#include - -} diff --git a/archive/uppsrc/AnalyzeMap/Analyze.cpp b/archive/uppsrc/AnalyzeMap/Analyze.cpp deleted file mode 100644 index c2515e53b..000000000 --- a/archive/uppsrc/AnalyzeMap/Analyze.cpp +++ /dev/null @@ -1,118 +0,0 @@ -#include -#include -#include - -using namespace Upp; - -#define DLLFILENAME "imagehlp.dll" -#define DLIHEADER "imagehlp.dli" -#define DLIMODULE Imagehlp -#include - -String AnalyzeMap(String fn) -{ - Vector len; - Vector name; - String map = LoadFile(fn); - if(IsNull(map)) - return "can't open " + fn; - const char *p = map; - while(*p) - if(*p++ == '\n' && !memcmp(p, " 0001:", 6)) { - p += 5; - while(IsXDigit(*++p)) - ; - while(*p == ' ') - p++; - const char *b = p; - while((byte)*p > ' ') - p++; - const char *e = p; - while(*p == ' ') - p++; - if(e > b && IsXDigit(*p)) { - unsigned addr = strtoul(p, 0, 16); - if(len.GetCount()) - len.Top() = addr - len.Top(); - len.Add(addr); - name.Add(String(b, e)); - } - - } -// if(len.GetCount()) -// len.Top() -= addr; - IndexSort(len, name, StdGreater()); - String r; - for(int i = 0; i < len.GetCount(); i++) { - r << Sprintf("%5d: ", len[i]); - if(Imagehlp()) { - char nm[1024]; - Imagehlp().UnDecorateSymbolName(name[i], nm, 1024, UNDNAME_NO_ACCESS_SPECIFIERS| - UNDNAME_NO_MEMBER_TYPE|UNDNAME_NO_MS_KEYWORDS); - r << nm; - } - else - r << name[i]; - r << '\n'; - } - return r; -} - -class MapAnalyzer : public TopWindow { -public: - typedef MapAnalyzer CLASSNAME; - MapAnalyzer(); - - void Run(); - - bool OpenFile(); - - virtual bool Key(dword key, int repcnt); - - void LoadCrashFile(); - -private: - LineEdit map; -}; - -MapAnalyzer::MapAnalyzer() -{ - Sizeable().Zoomable(); - Add(map.SizePos()); -} - -void MapAnalyzer::Run() -{ - if(!OpenFile()) - return; - TopWindow::Run(); -} - -bool MapAnalyzer::Key(dword key, int repcnt) -{ - if(key == K_CTRL_O) { - OpenFile(); - return true; - } - return TopWindow::Key(key, repcnt); -} - -bool MapAnalyzer::OpenFile() -{ - FileSel fs; - LoadFromFile(fs); - fs.Type("Map file", "*.map"); - fs.DefaultExt("map"); - fs.Multi(); - if(!fs.ExecuteOpen()) return false; - StoreToFile(fs); - map <<= AnalyzeMap(~fs); - return true; -} - -GUI_APP_MAIN -{ - SetDefaultCharset(CHARSET_WIN1250); - MapAnalyzer viewer; - viewer.Run(); -} diff --git a/archive/uppsrc/AnalyzeMap/AnalyzeMap.upp b/archive/uppsrc/AnalyzeMap/AnalyzeMap.upp deleted file mode 100644 index 9b9c31309..000000000 --- a/archive/uppsrc/AnalyzeMap/AnalyzeMap.upp +++ /dev/null @@ -1,14 +0,0 @@ -description "Utility to analyze .map files\377"; - -uses - CtrlLib; - -file - imagehlp.dli, - Analyze.cpp, - Info readonly separator, - Copying; - -mainconfig - "" = "GUI"; - diff --git a/archive/uppsrc/AnalyzeMap/Copying b/archive/uppsrc/AnalyzeMap/Copying deleted file mode 100644 index 82aabaae4..000000000 --- a/archive/uppsrc/AnalyzeMap/Copying +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 2021, The U++ Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted -provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other materials provided - with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/archive/uppsrc/AnalyzeMap/crash.ico b/archive/uppsrc/AnalyzeMap/crash.ico deleted file mode 100644 index d27561707219b6ca6df64e794e905acf4213e3ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 974 zcmah|J5Izf5Pflww%m+M8WI)s4ifl zzZum9E;JR*EPh?bIJWln$8X^79XNXd)`lIh8iCfZ;U_f%|H$mOeav|~)|l&AZR?T# IHtWgWKVENi00000 diff --git a/archive/uppsrc/AnalyzeMap/crash.mak b/archive/uppsrc/AnalyzeMap/crash.mak deleted file mode 100644 index 3540afd23..000000000 --- a/archive/uppsrc/AnalyzeMap/crash.mak +++ /dev/null @@ -1,313 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on crash.dsp -!IF "$(CFG)" == "" -CFG=crash - Win32 Debug -!MESSAGE No configuration specified. Defaulting to crash - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "crash - Win32 Release" && "$(CFG)" != "crash - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "crash.mak" CFG="crash - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "crash - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "crash - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "crash - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release - -!IF "$(RECURSE)" == "0" - -ALL : "c:\tools\crash.exe" - -!ELSE - -ALL : "VLib - Win32 Release" "tlib - Win32 Release" "tgui - Win32 Release" "CtrlLib - Win32 Release" "c:\tools\crash.exe" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"CtrlLib - Win32 ReleaseCLEAN" "tgui - Win32 ReleaseCLEAN" "tlib - Win32 ReleaseCLEAN" "VLib - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\crash.obj" - -@erase "$(INTDIR)\crash.res" - -@erase "$(INTDIR)\vc60.idb" - -@erase "c:\tools\crash.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MT /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\crash.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC_PROJ=/l 0x405 /fo"$(INTDIR)\crash.res" /d "NDEBUG" -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\crash.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=/nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\crash.pdb" /machine:I386 /out:"c:/tools/crash.exe" -LINK32_OBJS= \ - "$(INTDIR)\crash.obj" \ - "$(INTDIR)\crash.res" \ - "..\CtrlLib\Release\CtrlLib.lib" \ - "E:\build\tgui\Release\tgui.lib" \ - "E:\build\tlib\Release\tlib.lib" \ - "..\VLib\Release\VLib.lib" - -"c:\tools\crash.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "crash - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\crash.exe" - -!ELSE - -ALL : "VLib - Win32 Debug" "tlib - Win32 Debug" "tgui - Win32 Debug" "CtrlLib - Win32 Debug" "$(OUTDIR)\crash.exe" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"CtrlLib - Win32 DebugCLEAN" "tgui - Win32 DebugCLEAN" "tlib - Win32 DebugCLEAN" "VLib - Win32 DebugCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\crash.obj" - -@erase "$(INTDIR)\crash.res" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\crash.exe" - -@erase "$(OUTDIR)\crash.ilk" - -@erase "$(OUTDIR)\crash.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MTd /W3 /Gm /GR /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\crash.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC_PROJ=/l 0x405 /fo"$(INTDIR)\crash.res" /d "_DEBUG" -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\crash.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=/nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\crash.pdb" /debug /machine:I386 /out:"$(OUTDIR)\crash.exe" /pdbtype:sept -LINK32_OBJS= \ - "$(INTDIR)\crash.obj" \ - "$(INTDIR)\crash.res" \ - "..\CtrlLib\Debug\CtrlLib.lib" \ - "E:\build\tgui\Debug\tgui.lib" \ - "E:\build\tlib\Debug\tlib.lib" \ - "..\VLib\Debug\VLib.lib" - -"$(OUTDIR)\crash.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("crash.dep") -!INCLUDE "crash.dep" -!ELSE -!MESSAGE Warning: cannot find "crash.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "crash - Win32 Release" || "$(CFG)" == "crash - Win32 Debug" -SOURCE=.\crash.cpp - -"$(INTDIR)\crash.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\crash.rc - -"$(INTDIR)\crash.res" : $(SOURCE) "$(INTDIR)" - $(RSC) $(RSC_PROJ) $(SOURCE) - - -!IF "$(CFG)" == "crash - Win32 Release" - -"CtrlLib - Win32 Release" : - cd "\SOURCE\CtrlLib" - $(MAKE) /$(MAKEFLAGS) /F .\CtrlLib.mak CFG="CtrlLib - Win32 Release" - cd "..\crash" - -"CtrlLib - Win32 ReleaseCLEAN" : - cd "\SOURCE\CtrlLib" - $(MAKE) /$(MAKEFLAGS) /F .\CtrlLib.mak CFG="CtrlLib - Win32 Release" RECURSE=1 CLEAN - cd "..\crash" - -!ELSEIF "$(CFG)" == "crash - Win32 Debug" - -"CtrlLib - Win32 Debug" : - cd "\SOURCE\CtrlLib" - $(MAKE) /$(MAKEFLAGS) /F .\CtrlLib.mak CFG="CtrlLib - Win32 Debug" - cd "..\crash" - -"CtrlLib - Win32 DebugCLEAN" : - cd "\SOURCE\CtrlLib" - $(MAKE) /$(MAKEFLAGS) /F .\CtrlLib.mak CFG="CtrlLib - Win32 Debug" RECURSE=1 CLEAN - cd "..\crash" - -!ENDIF - -!IF "$(CFG)" == "crash - Win32 Release" - -"tgui - Win32 Release" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tgui.mak CFG="tgui - Win32 Release" - F: - cd "F:\SOURCE\crash" - -"tgui - Win32 ReleaseCLEAN" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tgui.mak CFG="tgui - Win32 Release" RECURSE=1 CLEAN - F: - cd "F:\SOURCE\crash" - -!ELSEIF "$(CFG)" == "crash - Win32 Debug" - -"tgui - Win32 Debug" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tgui.mak CFG="tgui - Win32 Debug" - F: - cd "F:\SOURCE\crash" - -"tgui - Win32 DebugCLEAN" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tgui.mak CFG="tgui - Win32 Debug" RECURSE=1 CLEAN - F: - cd "F:\SOURCE\crash" - -!ENDIF - -!IF "$(CFG)" == "crash - Win32 Release" - -"tlib - Win32 Release" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tlib.mak CFG="tlib - Win32 Release" - F: - cd "F:\SOURCE\crash" - -"tlib - Win32 ReleaseCLEAN" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tlib.mak CFG="tlib - Win32 Release" RECURSE=1 CLEAN - F: - cd "F:\SOURCE\crash" - -!ELSEIF "$(CFG)" == "crash - Win32 Debug" - -"tlib - Win32 Debug" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tlib.mak CFG="tlib - Win32 Debug" - F: - cd "F:\SOURCE\crash" - -"tlib - Win32 DebugCLEAN" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tlib.mak CFG="tlib - Win32 Debug" RECURSE=1 CLEAN - F: - cd "F:\SOURCE\crash" - -!ENDIF - -!IF "$(CFG)" == "crash - Win32 Release" - -"VLib - Win32 Release" : - cd "\SOURCE\VLib" - $(MAKE) /$(MAKEFLAGS) /F .\VLib.mak CFG="VLib - Win32 Release" - cd "..\crash" - -"VLib - Win32 ReleaseCLEAN" : - cd "\SOURCE\VLib" - $(MAKE) /$(MAKEFLAGS) /F .\VLib.mak CFG="VLib - Win32 Release" RECURSE=1 CLEAN - cd "..\crash" - -!ELSEIF "$(CFG)" == "crash - Win32 Debug" - -"VLib - Win32 Debug" : - cd "\SOURCE\VLib" - $(MAKE) /$(MAKEFLAGS) /F .\VLib.mak CFG="VLib - Win32 Debug" - cd "..\crash" - -"VLib - Win32 DebugCLEAN" : - cd "\SOURCE\VLib" - $(MAKE) /$(MAKEFLAGS) /F .\VLib.mak CFG="VLib - Win32 Debug" RECURSE=1 CLEAN - cd "..\crash" - -!ENDIF - - -!ENDIF diff --git a/archive/uppsrc/AnalyzeMap/imagehlp.dli b/archive/uppsrc/AnalyzeMap/imagehlp.dli deleted file mode 100644 index 15f243902..000000000 --- a/archive/uppsrc/AnalyzeMap/imagehlp.dli +++ /dev/null @@ -1 +0,0 @@ -FN_C(DWORD, __stdcall, UnDecorateSymbolName, (PCSTR dn, PSTR udn, DWORD len, DWORD Flags)) diff --git a/archive/uppsrc/BuildAll/BuildAll.cpp b/archive/uppsrc/BuildAll/BuildAll.cpp deleted file mode 100644 index 0354e748c..000000000 --- a/archive/uppsrc/BuildAll/BuildAll.cpp +++ /dev/null @@ -1,125 +0,0 @@ -#include - -using namespace Upp; - -// This is diagnostic package: -// It compiles all U++ examples using MSC8 and MINGW build methods -// or methods listed on commandline - -String input = "c:/upp.src"; -String output = "c:/upp/all"; -String umk = "c:\\upp\\umk.exe "; -Vector bm; - -bool failed; - -const char *exclude[] = { - "SDLEXAMPLE", "OLECALC", // REACTIVATE LATER - "LOG:R", - "WINFB", "LINUXFB", "FRAMEBUFFER", "COUNTER", "REGEXPEXT", -#ifdef PLATFORM_WIN32 - "SQL_MYSQL", -#endif -#ifdef PLATFORM_LINUX - "SQL_MSSQL", "CAPTURESCREENDLL", "UWORD_FB", "ODBCTST", "WMF" -#endif -}; - -bool IsIgnored(const String& name) -{ - return Find(exclude, exclude + __countof(exclude), ToUpper(name)); -} - -void Build(const char *nest, const char *bm, bool release) -{ - String flags = release ? "r" : "b"; - String mn = release ? "R" : "D"; - String n = String().Cat() << nest << '-' << bm << '-' << mn; - Cout() << n << '\n'; - String outdir = AppendFileName(output, n); - DeleteFolderDeep(outdir); - RealizeDirectory(outdir); - FindFile ff(AppendFileName(AppendFileName(input, nest), "*.*")); - bool first = true; - while(ff) { - String name = ff.GetName(); - if(ff.IsFolder() && !ff.IsHidden() && - !IsIgnored(name) && !IsIgnored(name + ":" + mn) && !IsIgnored(String(nest) + ':' + name + ':' + mn)) { - String txt; - txt << nest << ' ' << name << ' ' << bm << ' ' << mn; - String c; - c << umk << nest << ' ' << name << ' ' << bm << " -" << flags; - if(first) - c << 'a'; - #ifdef PLATFORM_POSIX - c << 's'; - #endif - c << ' ' << outdir; - Cout() << c; - String out; - if(Sys(c, out)) { - Cout() << " *** FAILED *** !\n"; - failed = true; - LOG("FAILED: " << txt); - LOG(c); - LOG(out); - } - else { - Cout() << " ok\n"; - first = false; - } - } - DeleteFile(AppendFileName(outdir, ff.GetName() + ".ilk")); - DeleteFile(AppendFileName(outdir, ff.GetName() + ".pdb")); - ff.Next(); - } -} - -void Build(const char *nest, bool release) -{ - for(int i = 0; i < bm.GetCount(); i++) - Build(nest, bm[i], release); -} - -void Build(const char *nest) -{ - Build(nest, false); -// Build(nest, true); -} - -CONSOLE_APP_MAIN -{ -#ifdef PLATFORM_POSIX - input = GetHomeDirFile("upp.src"); - output = GetHomeDirFile("tstout"); - umk = GetHomeDirFile("bin/umk") + ' '; -#endif - - LOG("BuildAll started"); - const Vector& arg = CommandLine(); - input = GetFileFolder(GetFileFolder(GetFileFolder(GetDataFile("BuildAll.cpp")))); - for(int i = 0; i < arg.GetCount(); i++) - bm.Add(arg[i]); - if(bm.GetCount() == 0) { -// bm.Add("MSC71cdb"); -#ifdef PLATFORM_POSIX - bm.Add("GCC"); -#else - bm.Add("MSC9"); -#endif -// bm.Add("MINGWI2"); - } - Build("examples"); - Build("reference"); - Build("tutorial"); - Build("upptst", false); - if(failed) { - Cout() << "THERE WERE ERRORS!\n"; - SetExitCode(1); - } - else { - Cout() << "OK.\n"; - LOG("OK"); - } -// RDUMPC(failed); -} diff --git a/archive/uppsrc/BuildAll/BuildAll.upp b/archive/uppsrc/BuildAll/BuildAll.upp deleted file mode 100644 index 22a9eda9b..000000000 --- a/archive/uppsrc/BuildAll/BuildAll.upp +++ /dev/null @@ -1,11 +0,0 @@ -description "Utility that builds all U++ examples\377"; - -uses - Core; - -file - BuildAll.cpp; - -mainconfig - "" = ""; - diff --git a/archive/uppsrc/CbGen/CbGen.upp b/archive/uppsrc/CbGen/CbGen.upp deleted file mode 100644 index f51a54586..000000000 --- a/archive/uppsrc/CbGen/CbGen.upp +++ /dev/null @@ -1,13 +0,0 @@ -description "Utility to generate (long and repetitive) callback C++ source files\377"; - -uses - Core; - -file - CppGen.cpp, - Info readonly separator, - Copying; - -mainconfig - "Normal" = ""; - diff --git a/archive/uppsrc/CbGen/Copying b/archive/uppsrc/CbGen/Copying deleted file mode 100644 index 82aabaae4..000000000 --- a/archive/uppsrc/CbGen/Copying +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 2021, The U++ Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted -provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other materials provided - with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/archive/uppsrc/CbGen/CppGen.cpp b/archive/uppsrc/CbGen/CppGen.cpp deleted file mode 100644 index 6d5c91746..000000000 --- a/archive/uppsrc/CbGen/CppGen.cpp +++ /dev/null @@ -1,401 +0,0 @@ -#include - -using namespace Upp; - -String If(String s, String txt) -{ - return IsNull(s) ? String() : txt; -} - -void CallbackGen(String name, String rettype, int n, String extension, String atest = Null) -{ - LOG("// -----------------------------------------------------------"); - String classdef, classlist, paramdef, paramlist; - for(int i = 1; i <= n; i++) { - if(i > 1) { - classdef << ", "; - classlist << ", "; - paramdef << ", "; - paramlist << ", "; - } - classdef << Format("class P%d", i); - classlist << Format("P%d", i); - paramdef << Format("P%d p%d", i, i); - paramlist << Format("p%d", i); - } - String cl_list = If(classlist, "<" + classlist + ">"); - String cl_temp = String("template "; - String return_ = rettype == "void" ? "" : "return "; - String name_cl = name + cl_list; - LOG(""); - if(!IsNull(classdef)) - LOG("template <" << classdef << ">"); - LOG("struct " << name << "Action {"); - LOGBEGIN(); - LOG("Atomic count;"); - LOG(""); - LOG("virtual " << rettype << " Execute(" + paramdef + ") = 0;"); - LOG("virtual bool IsValid() const { return true; }"); -// LOG("virtual bool IsEqual(const " << name << "Action *other) const = 0;"); -// LOG("virtual unsigned GetHashValue() const = 0;"); - LOG(""); - LOG(name << "Action() { count = 1; }"); - LOG("virtual ~" << name << "Action() {}"); - LOGEND(); - LOG("};"); - LOG(""); - - LOG("#ifdef HAS_LAMBDA"); - if(!IsNull(classdef)) - LOG("template <" << classdef << ">"); - LOG("struct Lambda" << name << " : public " << name << "Action" << cl_list + " {"); - LOGBEGIN(); - LOG("std::function<" << rettype << " (" << classlist << ")> fn;"); - if(rettype == "void") - LOG("virtual void Execute(" << paramdef << ") { fn(" << paramlist << "); }"); - else - LOG("virtual " << rettype << " Execute(" << paramdef << ") { return fn(" << paramlist << "); }"); - LOG(""); - LOG("Lambda" << name << "(std::function<" << rettype << " (" << classlist << ")> fn) : fn(fn) {}"); - LOGEND(); - LOG("};"); - LOG("#endif"); - LOG(""); - -#if 0 - LOG(cl_temp); - LOG("struct " << name << "MethodActionPte : public " << name << "Action" << cl_list + " {"); - LOGBEGIN(); - LOG("Ptr object;"); - LOG("METHOD method;"); - LOG(""); - if(rettype == "void") - LOG(rettype << " Execute(" << paramdef << ") { if(object) (object->*method)(" << paramlist << "); }"); - else - LOG(rettype << " Execute(" << paramdef << ") { return object ? (object->*method)(" << paramlist << ") : false; }"); - LOG("bool IsValid() const { return object; }"); -// LOG("bool IsEqual(const " << name << "Action" << cl_list << " *other) const {"); -// LOGBEGIN(); -// LOG("const " << name << "MethodActionPte *q = dynamic_cast(other);"); -// LOG("return q ? q->object == object && q->method == method : false;"); -// LOGEND(); -// LOG("}"); -// LOG("unsigned GetHashValue() const {"); -// LOG("\treturn (unsigned)(uintptr_t)~object ^ (unsigned)brutal_cast(method);"); -// LOG("}"); - LOG(""); - LOG(name << "MethodActionPte(OBJECT *object, METHOD method) " - ": object(object), method(method) {}"); - LOGEND(); - LOG("};"); - LOG(""); - - LOG(cl_temp); - LOG("struct " << name << "MethodAction : public " << name << "Action" << cl_list + " {"); - LOGBEGIN(); - LOG("OBJECT *object;"); - LOG("METHOD method;"); - LOG(""); - LOG(rettype << " Execute(" << paramdef << ") { " << - return_ << "(object->*method)(" << paramlist << "); }"); -/* LOG("bool IsEqual(const " << name << "Action" << cl_list << " *other) const {"); - LOGBEGIN(); - LOG("const " << name << "MethodAction *q = dynamic_cast(other);"); - LOG("return q ? q->object == object && q->method == method : false;"); - LOGEND(); - LOG("}"); - LOG("unsigned GetHashValue() const {"); - LOG("\treturn (unsigned)(uintptr_t)object ^ (unsigned)brutal_cast(method);"); - LOG("}"); -*/ LOG(""); - LOG(name << "MethodAction(OBJECT *object, METHOD method) " - ": object(object), method(method) {}"); - LOGEND(); - LOG("};"); - LOG(""); - - if(!IsNull(classdef)) - LOG("template <" << classdef << ">"); - LOG("struct " << name << "FnAction : public " << name << "Action" << cl_list << " {"); - LOGBEGIN(); - LOG(rettype << " (*fn)(" << paramdef << ");"); - LOG(""); - LOG(rettype << " Execute(" << paramdef << ") { " << return_ << "(*fn)(" << - paramlist << "); }"); -/* LOG("bool IsEqual(const " << name << "Action" << cl_list << " *other) const {"); - LOGBEGIN(); - LOG("const " << name << "FnAction *q = dynamic_cast(other);"); - LOG("return q ? q->fn == fn : false;"); - LOGEND(); - LOG("}"); - LOG("unsigned GetHashValue() const {"); - LOG("\treturn (unsigned)(uintptr_t)fn;"); - LOG("}"); -*/ LOG(""); - LOG(name << "FnAction(" << rettype << " (*fn)(" << paramdef << ")) : fn(fn) {}"); - LOGEND(); - LOG("};"); - LOG(""); -#endif - - if(!IsNull(classdef)) - LOG("template <" << classdef << ">"); - LOG("class " << name << " : Moveable< " << name_cl << " > {"); - LOGBEGIN(); - LOG(name << "Action" << cl_list << " *action;"); - LOG(""); - LOG("void Retain() const { if(action " << atest << ") AtomicInc(action->count); }"); - LOG("void Release() { if(action " << atest << " && AtomicDec(action->count) == 0) delete action; }"); - LOG(""); - LOG("bool operator==(const " << name << "&);"); - LOG("bool operator!=(const " << name << "&);"); - LOG(""); - LOGEND(); - LOG("public:"); - LOGBEGIN(); - LOG("typedef " << name << " CLASSNAME;"); - LOG(""); - LOG(name << "& operator=(const " << name << "& c);"); - LOG(name << "(const " << name << "& c);"); - LOG("void Clear() { Release(); action = NULL; }"); - LOG(""); -// LOG("unsigned GetHashValue() const { return action->GetHashValue(); }"); - LOG(""); - LOG(extension); - LOG(""); - LOG("explicit " << name << "(" << name << "Action " << cl_list << - " *newaction) { action = newaction; }"); -// LOG(name << "& operator=(" << name << "Action" << cl_list << -// " *newaction) { action = newaction; return *this; }"); - LOG(name << "() { action = NULL; }"); - LOG(name << "(_CNULL) { action = NULL; }"); - LOG("~" << name << "();"); - LOGEND(); - LOG("#ifdef HAS_LAMBDA"); - LOGBEGIN(); - LOG(name << "& operator=(std::function<" << rettype << " (" << classlist << ")> l) { Clear(); action = new Lambda" << name << "<" << classlist << ">(l); return *this; }"); - LOGEND(); - LOG("#endif"); - LOGBEGIN(); - LOG(""); - LOG("static " << name << " Empty() { return CNULL; }"); - LOG(""); -// LOG("friend bool operator==(const " << name << "& a, const " << name << "& b)"); -// LOG("\t{ return a.action ? a.action->IsEqual(b.action) : !b.action; }"); -// LOG("friend bool operator!=(const " << name << "& a, const " << name << " & b)"); -// LOG("\t{ return !(a == b); }"); - LOGEND(); - LOG("};"); - LOG(""); - -#if 0 - LOG(cl_temp); - LOG(name_cl << " pteback(OBJECT *object, " << rettype << - " (METHOD::*method)(" << paramdef << ")) {"); - LOG("\treturn " << name_cl << - "(new " << name << "MethodActionPte(object, method));"); - LOG("}"); - LOG(""); - - LOG(cl_temp); - LOG(name_cl << " callback(OBJECT *object, " << rettype << - " (METHOD::*method)(" << paramdef << ")) {"); - LOG("\treturn " << name_cl << - "(new " << name << "MethodAction(object, method));"); - LOG("}"); - LOG(""); - - LOG(cl_temp); - LOG(name_cl << " callback(const OBJECT *object, " << rettype << - " (METHOD::*method)(" << paramdef << ") const) {"); - LOG("\treturn " << name_cl << - "(new " << name << "MethodAction(object, method));"); - LOG("}"); - LOG(""); - - if(!IsNull(classdef)) - LOG("template <" << classdef << ">"); - LOG("inline " << name_cl << " callback(" << rettype << " (*fn)(" << paramdef << ")) {"); - LOG("\treturn " << name_cl << "(new " << name << "FnAction " << cl_list << "(fn));"); - LOG("}"); - LOG(""); - - - if(!IsNull(classdef)) - LOG("template <" << classdef << ">"); - LOG("struct " << name << "ForkAction : public " << name << "Action" << cl_list << " {"); - LOGBEGIN(); - LOG(name_cl << " cb1, cb2;"); - LOG(""); - LOG(rettype << " Execute(" << paramdef << ") { cb1(" << paramlist << - "); " << return_ << "cb2(" << paramlist << "); }"); -// LOG("bool IsEqual(const " << name << "Action " << cl_list << " *other) const {"); -// LOG("\tconst " << name << "ForkAction *q = dynamic_cast(other);"); -// LOG("\treturn q ? q->cb1 == cb1 && q->cb2 == cb2 : false;"); -// LOG("}"); -// LOG("unsigned GetHashValue() const {"); -// LOG("\treturn ::GetHashValue(cb1) ^ ::GetHashValue(cb2);"); -// LOG("}"); - LOG(""); - LOG(name << "ForkAction(" << name_cl << " cb1, " << name_cl << " cb2)" - "\n\t : cb1(cb1), cb2(cb2) {}"); - LOGEND(); - LOG("};"); - LOG(""); - - if(!IsNull(classdef)) - LOG("template <" << classdef << ">"); - LOG("inline " << name_cl << " Proxy(" << name_cl << "& cb)"); - LOG("{"); - LOG("\treturn callback(&cb, &" << name_cl << "::Execute);"); - LOG("}"); - LOG(""); - - if(IsNull(classdef)) { - LOG(name_cl << " callback(" << name_cl << " cb1, " << name_cl << " cb2);"); - LOG(name_cl << "& operator<<(" << name_cl << "& a, " << name_cl << " b);"); - LOG(""); - LOG("#endif"); - LOG("#ifdef CPP_PART__"); - LOG(""); - } - - if(!IsNull(classdef)) - LOG("template <" << classdef << ">"); - LOG(name_cl << " callback(" << name_cl << " cb1, " << name_cl << " cb2)"); - LOG("{"); - LOG("\treturn " << name_cl << "(new " << name << "ForkAction " << cl_list << "(cb1, cb2));"); - LOG("}"); - LOG(""); - - if(!IsNull(classdef)) - LOG("template <" << classdef << ">"); - LOG(name_cl << "& operator<<(" << name_cl << "& a, " << name_cl << " b)"); - LOG("{"); - LOG("\tif(a)"); - LOG("\t\ta = callback(a, b);"); - LOG("\telse"); - LOG("\t\ta = b;"); - LOG("\treturn a;"); - LOG("}"); - LOG(""); - - if(!IsNull(classdef)) - LOG("template <" << classdef << ">"); - LOG(name_cl << "& " << name_cl << "::operator=(const " << name << "& c)"); - LOG("{"); - LOG("\tc.Retain();"); - LOG("\tRelease();"); - LOG("\taction = c.action;"); - LOG("\treturn *this;"); - LOG("}"); - LOG(""); - if(!IsNull(classdef)) - LOG("template <" << classdef << ">"); - LOG(name_cl << "::" << name << "(const " << name << "& c)"); - LOG("{"); - LOG("\taction = c.action;"); - LOG("\tRetain();"); - LOG("}"); - LOG(""); - if(!IsNull(classdef)) - LOG("template <" << classdef << ">"); - LOG(name_cl << "::~" << name << "()"); - LOG("{"); - LOG("\tRelease();"); - LOG("}"); - LOG(""); - if(IsNull(classdef)) { - LOG("#endif"); - LOG("#ifndef CPP_PART__"); - LOG(""); - } -#endif -}; - -CONSOLE_APP_MAIN -{ - LOG("#ifndef CPP_PART__"); - LOG(""); - - CallbackGen("Callback", "void", 0, - "operator bool() const { return action && action->IsValid(); }\n" - "void Execute() const;\n" - "void operator()() const { Execute(); }" - ); - CallbackGen("Callback1", "void", 1, - "operator bool() const { return action && action->IsValid(); }\n" - "void Execute(P1 p1) const { if(action) action->Execute(p1); }\n" - "void operator()(P1 p1) const { Execute(p1); }" - ); - CallbackGen("Callback2", "void", 2, - "operator bool() const { return action && action->IsValid(); }\n" - "void Execute(P1 p1, P2 p2) const { if(action) action->Execute(p1, p2); }\n" - "void operator()(P1 p1, P2 p2) const { Execute(p1, p2); }" - ); - CallbackGen("Callback3", "void", 3, - "operator bool() const { return action && action->IsValid(); }\n" - "void Execute(P1 p1, P2 p2, P3 p3) const { if(action) action->Execute(p1, p2, p3); }\n" - "void operator()(P1 p1, P2 p2, P3 p3) const { Execute(p1, p2, p3); }" - ); - CallbackGen("Callback4", "void", 4, - "operator bool() const { return action && action->IsValid(); }\n" - "void Execute(P1 p1, P2 p2, P3 p3, P4 p4) const { if(action) action->Execute(p1, p2, p3, p4); }\n" - "void operator()(P1 p1, P2 p2, P3 p3, P4 p4) const { Execute(p1, p2, p3, p4); }" - ); - - CallbackGen("Gate", "bool", 0, - "operator bool() const { return (void *)action != (void *)1 && action && action->IsValid(); }\n" - "bool Execute() const;\n" - "bool operator()() const { return Execute(); }\n" - "void ClearTrue() { Clear(); action = (GateAction *)1; }\n" - "void ClearFalse() { Clear(); }\n\n" - "Gate(bool b) { action = (GateAction *)(int)b; }", - "&& (void *)action != (void *)1" - ); - CallbackGen("Gate1", "bool", 1, - "operator bool() const { return (void *)action != (void *)1 && action && action->IsValid(); }\n" - "bool Execute(P1 p1) const;\n" - "bool operator()(P1 p1) const { return Execute(p1); }\n" - "void ClearTrue() { Clear(); action = (Gate1Action *)1; }\n" - "void ClearFalse() { Clear(); }\n\n" - "Gate1(bool b) { action = (Gate1Action *)(uintptr_t)b; }", - "&& (void *)action != (void *)1" - ); - CallbackGen("Gate2", "bool", 2, - "operator bool() const { return (void *)action != (void *)1 && action && action->IsValid(); }\n" - "bool Execute(P1 p1, P2 p2) const;\n" - "bool operator()(P1 p1, P2 p2) const { return Execute(p1, p2); }\n" - "void ClearTrue() { Clear(); action = (Gate2Action *)1; }\n" - "void ClearFalse() { Clear(); }\n\n" - "Gate2(bool b) { action = (Gate2Action *)(uintptr_t)b; }", - "&& (void *)action != (void *)1" - ); - CallbackGen("Gate3", "bool", 3, - "operator bool() const { return (void *)action != (void *)1 && action && action->IsValid(); }\n" - "bool Execute(P1 p1, P2 p2, P3 p3) const;\n" - "bool operator()(P1 p1, P2 p2, P3 p3) const { return Execute(p1, p2, p3); }\n" - "void ClearTrue() { Clear(); action = (Gate3Action *)1; }\n" - "void ClearFalse() { Clear(); }\n\n" - "Gate3(bool b) { action = (Gate3Action *)(uintptr_t)b; }", - "&& (void *)action != (void *)1" - ); - CallbackGen("Gate4", "bool", 4, - "operator bool() const { return (void *)action != (void *)1 && action && action->IsValid(); }\n" - "bool Execute(P1 p1, P2 p2, P3 p3, P4 p4) const;\n" - "bool operator()(P1 p1, P2 p2, P3 p3, P4 p4) const { return Execute(p1, p2, p3, p4); }\n" - "void ClearTrue() { Clear(); action = (Gate4Action *)1; }\n" - "void ClearFalse() { Clear(); }\n\n" - "Gate4(bool b) { action = (Gate4Action *)(uintptr_t)b; }", - "&& (void *)action != (void *)1" - ); - LOG(""); - LOG("#endif"); -} diff --git a/archive/uppsrc/Crash/Copying b/archive/uppsrc/Crash/Copying deleted file mode 100644 index 82aabaae4..000000000 --- a/archive/uppsrc/Crash/Copying +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 2021, The U++ Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted -provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other materials provided - with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/archive/uppsrc/Crash/Crash.upp b/archive/uppsrc/Crash/Crash.upp deleted file mode 100644 index 75953b0e8..000000000 --- a/archive/uppsrc/Crash/Crash.upp +++ /dev/null @@ -1,16 +0,0 @@ -description "Utility to examine content of .crash and .map files\377"; - -uses - CtrlLib; - -file - imagehlp.dli, - crash.cpp, - crash.iml, - crash.rc, - Info readonly separator, - Copying; - -mainconfig - "" = "GUI"; - diff --git a/archive/uppsrc/Crash/crash.cpp b/archive/uppsrc/Crash/crash.cpp deleted file mode 100644 index 060ba3a9c..000000000 --- a/archive/uppsrc/Crash/crash.cpp +++ /dev/null @@ -1,253 +0,0 @@ -#include -#include -#include - -using namespace Upp; - -#define DLLFILENAME "imagehlp.dll" -#define DLIHEADER "imagehlp.dli" -#define DLIMODULE Imagehlp -#include - -Vector address; -Vector name; -String mapname; - -void LoadMap(String fn) -{ - String fpos = GetFileName(fn); - int dp = fpos.Find('.'); - if(dp >= 0) - fpos.Trim(dp); - fn = AppendFileName(GetFileDirectory(fn), fpos) + ".map"; - if(mapname == fn) - return; - mapname = fn; - address.Clear(); - name.Clear(); - String map = LoadFile(fn); - if(IsNull(map)) - return; - const char *p = map; - while(*p) - if(*p++ == '\n' && !memcmp(p, " 0001:", 6)) { - p += 5; - while(IsXDigit(*++p)) - ; - while(*p == ' ') - p++; - const char *b = p; - while((byte)*p > ' ') - p++; - const char *e = p; - while(*p == ' ') - p++; - if(e > b && IsXDigit(*p)) { - unsigned addr = strtoul(p, 0, 16); - address.Add(addr); - name.Add(String(b, e)); - } - } - IndexSort(address, name, StdLess()); -} - -String Fname(dword addr, bool& recognized) { - int pos = BinFindIndex(address, addr + 1) - 1; - String s; - s.Cat(Format("0x%08x", (int)addr)); - if(pos >= 0) { - dword off = addr - address[pos]; - if(off < 8000) { - s << ": "; - if(Imagehlp()) { - char nm[1024]; - Imagehlp().UnDecorateSymbolName(name[pos], nm, 1024, UNDNAME_NO_ACCESS_SPECIFIERS| - UNDNAME_NO_MEMBER_TYPE|UNDNAME_NO_MS_KEYWORDS); - s << nm; - } - else - s << name[pos]; - s << Format(" + 0x%x bytes", (int)off); - recognized = true; - return s; - } - } - s << " = " << Format("%d [%d, %d]", (int)addr, (int)LOWORD(addr), (int)HIWORD(addr)); - recognized = false; - return s; -} - -String LoadCrashFile(String filename) -{ - LoadMap(filename); - FileIn in(filename); - String text; - text << "Crash log " << GetFileName(filename) << "\n"; - if(name.GetCount() == 0) - text << "No mapfile found" << "\n"; - dword version; - dword code, address; - int npar; - in % version; - in % code % address % npar; - Vector info; - Vector stack; - bool r; - int i; - while(npar--) - in % info.Add(); - switch(code) { - case EXCEPTION_ACCESS_VIOLATION: - text << "Access violation "; - if(info.GetCount() >= 2) - text << (info[0] ? "writing" : "reading") << Format(" at 0x%08x", (int)info[1]); - break; - #define MEX(id) case id: text << #id; break; - MEX(EXCEPTION_DATATYPE_MISALIGNMENT) - MEX(EXCEPTION_BREAKPOINT) - MEX(EXCEPTION_SINGLE_STEP) - MEX(EXCEPTION_ARRAY_BOUNDS_EXCEEDED) - MEX(EXCEPTION_FLT_DENORMAL_OPERAND) - MEX(EXCEPTION_FLT_DIVIDE_BY_ZERO) - MEX(EXCEPTION_FLT_INEXACT_RESULT) - MEX(EXCEPTION_FLT_INVALID_OPERATION) - MEX(EXCEPTION_FLT_OVERFLOW) - MEX(EXCEPTION_FLT_STACK_CHECK) - MEX(EXCEPTION_FLT_UNDERFLOW) - MEX(EXCEPTION_INT_DIVIDE_BY_ZERO) - MEX(EXCEPTION_INT_OVERFLOW) - MEX(EXCEPTION_PRIV_INSTRUCTION) - MEX(EXCEPTION_IN_PAGE_ERROR) - MEX(EXCEPTION_ILLEGAL_INSTRUCTION) - MEX(EXCEPTION_NONCONTINUABLE_EXCEPTION) - MEX(EXCEPTION_STACK_OVERFLOW) - MEX(EXCEPTION_INVALID_DISPOSITION) - MEX(EXCEPTION_GUARD_PAGE) - MEX(EXCEPTION_INVALID_HANDLE) - default: - text << Format("Exception 0x%08x", (int)code); - } - text << '\n' << Fname(address, r) << '\n'; - while(!in.IsEof()) - in % stack.Add(); - text << "\nRecognized stack dwords:\n"; - for(i = 0; i < stack.GetCount(); i++) { - String s = Fname(stack[i], r); - if(r) text << "\t" << s << '\n'; - } - text << "\nComplete stack:\n"; - for(i = 0; i < stack.GetCount(); i++) - text << "\t" << Fname(stack[i], r) << '\n'; - return text; -} - -class CrashViewer : public TopWindow { -public: - typedef CrashViewer CLASSNAME; - CrashViewer(); - - void Run(); - - bool OpenFile(); - - virtual bool Key(dword key, int repcnt); - - void LoadCrashFile(); - -private: - Splitter splitter; - ArrayCtrl crashfiles; - LineEdit crashdump; -}; - -CrashViewer::CrashViewer() -{ - Sizeable().Zoomable(); - splitter.Horz(crashfiles, crashdump); - splitter.SetPos(3000); - Add(splitter.SizePos()); - crashfiles.AutoHideSb().NoHeader(); - crashfiles.AddColumn(); - crashfiles.WhenCursor = THISBACK(LoadCrashFile); - crashdump.SetFont(Courier(14)); -} - -void CrashViewer::Run() -{ - if(!OpenFile()) - return; - LoadCrashFile(); - TopWindow::Run(); -} - -bool CrashViewer::Key(dword key, int repcnt) -{ - if(key == K_CTRL_O) { - OpenFile(); - return true; - } - return TopWindow::Key(key, repcnt); -} - -bool CrashViewer::OpenFile() -{ - FileSelector fs; - LoadFromFile(fs); - fs.Type("Crash file", "*.crash"); - fs.DefaultExt("crash"); - fs.Multi(); - if(!fs.ExecuteOpen()) return false; - StoreToFile(fs); - int newln = -1; - for(int i = 0; i < fs.GetCount(); i++) { - String path = fs[i]; - int f = crashfiles.Find(path); - if(f < 0) { - newln = crashfiles.GetCount(); - crashfiles.Add(path); - } - } - if(newln >= 0) - crashfiles.SetCursor(newln); - return true; -} - -void CrashViewer::LoadCrashFile() -{ - String fn = Null; - if(crashfiles.IsCursor()) - fn = crashfiles.Get(0); - String title = fn; - if(!IsNull(title)) - title << " - crash analyzer"; - else - title << "Crash analyzer"; - Title(title); - if(IsNull(fn)) - crashdump <<= Null; - else - crashdump <<= ::LoadCrashFile(fn); -} - -GUI_APP_MAIN -{ - SetDefaultCharset(CHARSET_WIN1250); - CrashViewer viewer; - viewer.Run(); -/* - FileSelector fs; - LoadFromFile(fs); - fs.Type("Crash file", "*.crash"); - if(!fs.ExecuteOpen()) return; - String text = LoadCrashFile(~fs); - TopWindow win; - win.Title("Crash analyzer - " + ~fs).Sizeable().Zoomable(); - win.Icon(Image::Icon(100, true), Image::Icon(100, false)); - LineEdit edit; - edit.SetFont(Courier(14)); - edit <<= text; - win.Add(edit.SizePos()); - win.Run(); -*/ -// StoreToFile(fs); -} diff --git a/archive/uppsrc/Crash/crash.ico b/archive/uppsrc/Crash/crash.ico deleted file mode 100644 index d27561707219b6ca6df64e794e905acf4213e3ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 974 zcmah|J5Izf5Pflww%m+M8WI)s4ifl zzZum9E;JR*EPh?bIJWln$8X^79XNXd)`lIh8iCfZ;U_f%|H$mOeav|~)|l&AZR?T# IHtWgWKVENi00000 diff --git a/archive/uppsrc/Crash/crash.iml b/archive/uppsrc/Crash/crash.iml deleted file mode 100644 index 95536032e..000000000 --- a/archive/uppsrc/Crash/crash.iml +++ /dev/null @@ -1,14 +0,0 @@ -PREMULTIPLIED -IMAGE_ID(app_large) -IMAGE_ID(app_small) - -IMAGE_BEGIN_DATA -IMAGE_DATA(120,156,229,150,91,14,132,48,8,69,89,194,44,193,165,186,115,102,162,153,153,22,41,143,66,91,19,49,124,244,193,61) -IMAGE_DATA(183,24,83,97,131,13,162,177,3,96,153,97,65,39,79,203,85,220,76,31,81,118,175,135,44,110,143,143,81,108,171,135) -IMAGE_DATA(149,252,209,108,201,195,44,118,203,195,74,254,108,54,245,240,100,126,57,70,60,147,142,203,57,109,141,211,224,106,189,115) -IMAGE_DATA(146,230,119,156,197,178,156,81,242,57,227,252,52,91,181,220,222,81,253,143,188,19,173,119,214,247,239,237,63,192,179,191) -IMAGE_DATA(255,59,240,87,120,0,18,171,249,51,61,112,236,89,30,36,246,29,248,35,61,88,216,35,124,120,185,153,30,34,236,136) -IMAGE_DATA(143,44,174,213,79,183,208,235,243,40,17,61,76,70,125,175,198,113,217,58,234,233,190,223,133,78,214,208,144,103,61,179) -IMAGE_DATA(70,52,43,93,186,118,140,1,46,63,80,194,153,254,251,160,145,214,122,100,180,116,15,151,61,149,134,163,190,234,35,214) -IMAGE_DATA(222,53,141,86,95,105,111,133,122,147,47,134,37,133,135,231,169,247,106,176,241,6,223,11,189,79,0,0,0,0,0,0) -IMAGE_END_DATA(256, 2) diff --git a/archive/uppsrc/Crash/crash.mak b/archive/uppsrc/Crash/crash.mak deleted file mode 100644 index 3540afd23..000000000 --- a/archive/uppsrc/Crash/crash.mak +++ /dev/null @@ -1,313 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on crash.dsp -!IF "$(CFG)" == "" -CFG=crash - Win32 Debug -!MESSAGE No configuration specified. Defaulting to crash - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "crash - Win32 Release" && "$(CFG)" != "crash - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!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 "crash.mak" CFG="crash - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "crash - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "crash - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "crash - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release - -!IF "$(RECURSE)" == "0" - -ALL : "c:\tools\crash.exe" - -!ELSE - -ALL : "VLib - Win32 Release" "tlib - Win32 Release" "tgui - Win32 Release" "CtrlLib - Win32 Release" "c:\tools\crash.exe" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"CtrlLib - Win32 ReleaseCLEAN" "tgui - Win32 ReleaseCLEAN" "tlib - Win32 ReleaseCLEAN" "VLib - Win32 ReleaseCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\crash.obj" - -@erase "$(INTDIR)\crash.res" - -@erase "$(INTDIR)\vc60.idb" - -@erase "c:\tools\crash.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MT /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\crash.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC_PROJ=/l 0x405 /fo"$(INTDIR)\crash.res" /d "NDEBUG" -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\crash.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=/nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\crash.pdb" /machine:I386 /out:"c:/tools/crash.exe" -LINK32_OBJS= \ - "$(INTDIR)\crash.obj" \ - "$(INTDIR)\crash.res" \ - "..\CtrlLib\Release\CtrlLib.lib" \ - "E:\build\tgui\Release\tgui.lib" \ - "E:\build\tlib\Release\tlib.lib" \ - "..\VLib\Release\VLib.lib" - -"c:\tools\crash.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "crash - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\crash.exe" - -!ELSE - -ALL : "VLib - Win32 Debug" "tlib - Win32 Debug" "tgui - Win32 Debug" "CtrlLib - Win32 Debug" "$(OUTDIR)\crash.exe" - -!ENDIF - -!IF "$(RECURSE)" == "1" -CLEAN :"CtrlLib - Win32 DebugCLEAN" "tgui - Win32 DebugCLEAN" "tlib - Win32 DebugCLEAN" "VLib - Win32 DebugCLEAN" -!ELSE -CLEAN : -!ENDIF - -@erase "$(INTDIR)\crash.obj" - -@erase "$(INTDIR)\crash.res" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\crash.exe" - -@erase "$(OUTDIR)\crash.ilk" - -@erase "$(OUTDIR)\crash.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MTd /W3 /Gm /GR /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\crash.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC_PROJ=/l 0x405 /fo"$(INTDIR)\crash.res" /d "_DEBUG" -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\crash.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=/nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\crash.pdb" /debug /machine:I386 /out:"$(OUTDIR)\crash.exe" /pdbtype:sept -LINK32_OBJS= \ - "$(INTDIR)\crash.obj" \ - "$(INTDIR)\crash.res" \ - "..\CtrlLib\Debug\CtrlLib.lib" \ - "E:\build\tgui\Debug\tgui.lib" \ - "E:\build\tlib\Debug\tlib.lib" \ - "..\VLib\Debug\VLib.lib" - -"$(OUTDIR)\crash.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("crash.dep") -!INCLUDE "crash.dep" -!ELSE -!MESSAGE Warning: cannot find "crash.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "crash - Win32 Release" || "$(CFG)" == "crash - Win32 Debug" -SOURCE=.\crash.cpp - -"$(INTDIR)\crash.obj" : $(SOURCE) "$(INTDIR)" - - -SOURCE=.\crash.rc - -"$(INTDIR)\crash.res" : $(SOURCE) "$(INTDIR)" - $(RSC) $(RSC_PROJ) $(SOURCE) - - -!IF "$(CFG)" == "crash - Win32 Release" - -"CtrlLib - Win32 Release" : - cd "\SOURCE\CtrlLib" - $(MAKE) /$(MAKEFLAGS) /F .\CtrlLib.mak CFG="CtrlLib - Win32 Release" - cd "..\crash" - -"CtrlLib - Win32 ReleaseCLEAN" : - cd "\SOURCE\CtrlLib" - $(MAKE) /$(MAKEFLAGS) /F .\CtrlLib.mak CFG="CtrlLib - Win32 Release" RECURSE=1 CLEAN - cd "..\crash" - -!ELSEIF "$(CFG)" == "crash - Win32 Debug" - -"CtrlLib - Win32 Debug" : - cd "\SOURCE\CtrlLib" - $(MAKE) /$(MAKEFLAGS) /F .\CtrlLib.mak CFG="CtrlLib - Win32 Debug" - cd "..\crash" - -"CtrlLib - Win32 DebugCLEAN" : - cd "\SOURCE\CtrlLib" - $(MAKE) /$(MAKEFLAGS) /F .\CtrlLib.mak CFG="CtrlLib - Win32 Debug" RECURSE=1 CLEAN - cd "..\crash" - -!ENDIF - -!IF "$(CFG)" == "crash - Win32 Release" - -"tgui - Win32 Release" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tgui.mak CFG="tgui - Win32 Release" - F: - cd "F:\SOURCE\crash" - -"tgui - Win32 ReleaseCLEAN" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tgui.mak CFG="tgui - Win32 Release" RECURSE=1 CLEAN - F: - cd "F:\SOURCE\crash" - -!ELSEIF "$(CFG)" == "crash - Win32 Debug" - -"tgui - Win32 Debug" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tgui.mak CFG="tgui - Win32 Debug" - F: - cd "F:\SOURCE\crash" - -"tgui - Win32 DebugCLEAN" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tgui.mak CFG="tgui - Win32 Debug" RECURSE=1 CLEAN - F: - cd "F:\SOURCE\crash" - -!ENDIF - -!IF "$(CFG)" == "crash - Win32 Release" - -"tlib - Win32 Release" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tlib.mak CFG="tlib - Win32 Release" - F: - cd "F:\SOURCE\crash" - -"tlib - Win32 ReleaseCLEAN" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tlib.mak CFG="tlib - Win32 Release" RECURSE=1 CLEAN - F: - cd "F:\SOURCE\crash" - -!ELSEIF "$(CFG)" == "crash - Win32 Debug" - -"tlib - Win32 Debug" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tlib.mak CFG="tlib - Win32 Debug" - F: - cd "F:\SOURCE\crash" - -"tlib - Win32 DebugCLEAN" : - E: - cd "E:\V\TLIB" - $(MAKE) /$(MAKEFLAGS) /F .\tlib.mak CFG="tlib - Win32 Debug" RECURSE=1 CLEAN - F: - cd "F:\SOURCE\crash" - -!ENDIF - -!IF "$(CFG)" == "crash - Win32 Release" - -"VLib - Win32 Release" : - cd "\SOURCE\VLib" - $(MAKE) /$(MAKEFLAGS) /F .\VLib.mak CFG="VLib - Win32 Release" - cd "..\crash" - -"VLib - Win32 ReleaseCLEAN" : - cd "\SOURCE\VLib" - $(MAKE) /$(MAKEFLAGS) /F .\VLib.mak CFG="VLib - Win32 Release" RECURSE=1 CLEAN - cd "..\crash" - -!ELSEIF "$(CFG)" == "crash - Win32 Debug" - -"VLib - Win32 Debug" : - cd "\SOURCE\VLib" - $(MAKE) /$(MAKEFLAGS) /F .\VLib.mak CFG="VLib - Win32 Debug" - cd "..\crash" - -"VLib - Win32 DebugCLEAN" : - cd "\SOURCE\VLib" - $(MAKE) /$(MAKEFLAGS) /F .\VLib.mak CFG="VLib - Win32 Debug" RECURSE=1 CLEAN - cd "..\crash" - -!ENDIF - - -!ENDIF diff --git a/archive/uppsrc/Crash/crash.rc b/archive/uppsrc/Crash/crash.rc deleted file mode 100644 index bd9331342..000000000 --- a/archive/uppsrc/Crash/crash.rc +++ /dev/null @@ -1 +0,0 @@ -100 ICON DISCARDABLE "crash.ico" diff --git a/archive/uppsrc/Crash/imagehlp.dli b/archive/uppsrc/Crash/imagehlp.dli deleted file mode 100644 index 15f243902..000000000 --- a/archive/uppsrc/Crash/imagehlp.dli +++ /dev/null @@ -1 +0,0 @@ -FN_C(DWORD, __stdcall, UnDecorateSymbolName, (PCSTR dn, PSTR udn, DWORD len, DWORD Flags)) diff --git a/archive/uppsrc/Crypto/BscF.cpp b/archive/uppsrc/Crypto/BscF.cpp deleted file mode 100644 index d6b6e5441..000000000 --- a/archive/uppsrc/Crypto/BscF.cpp +++ /dev/null @@ -1,158 +0,0 @@ -#include "Crypto.h" - -NAMESPACE_UPP - -template -class Birc { - byte r[N]; - int origin; -public: - byte& operator[](int i) { return r[(origin + i) % N]; } - void Restart() { origin = 0; } - void Move() { origin = (origin + 1) % N; } - - Birc() { origin = 0; } -}; - -struct BscF { - static byte T1[256]; - static const int Krok; - - Birc<81> R81, Q81; - byte IV[10], Wk[10]; /* MAC, Klic na zpr. */ - - void MAC_init(); - void R81_init(); - void MAC_step(); - byte R81_step(); - void R81_start(); - void MACDummy(); - void MACGen(const char *s, const char *lim); - void Start(); -}; - -const int BscF::Krok = 101; - -byte BscF::T1[256] = { - 32, 124, 29, 247, 230, 199, 244, 5, 86, 19, 125, 149, 108, 74, 237, 176, - 165, 82, 240, 236, 144, 154, 107, 131, 147, 66, 118, 116, 126, 250, 127, 23, - 232, 223, 243, 45, 83, 67, 216, 202, 33, 145, 62, 114, 61, 34, 205, 109, - 14, 6, 193, 238, 55, 196, 163, 182, 140, 8, 115, 222, 217, 191, 112, 73, - 142, 75, 214, 1, 59, 46, 239, 72, 164, 68, 180, 119, 209, 84, 152, 159, - 184, 36, 47, 99, 235, 212, 42, 38, 123, 26, 17, 97, 155, 22, 190, 175, - 64, 25, 94, 166, 183, 69, 234, 65, 195, 197, 77, 173, 20, 104, 63, 201, - 249, 15, 134, 122, 57, 204, 139, 0, 210, 174, 3, 2, 80, 135, 106, 213, - 56, 221, 172, 12, 162, 103, 188, 128, 9, 138, 137, 133, 54, 169, 100, 132, - 60, 28, 113, 141, 44, 255, 181, 111, 10, 117, 254, 160, 90, 218, 186, 30, - 48, 246, 79, 187, 37, 35, 53, 179, 129, 157, 146, 203, 177, 71, 27, 189, - 252, 229, 143, 130, 11, 78, 226, 105, 88, 101, 251, 24, 170, 7, 76, 41, - 198, 245, 208, 31, 21, 242, 89, 98, 225, 81, 219, 58, 96, 91, 215, 110, - 227, 93, 39, 220, 52, 211, 253, 85, 151, 70, 228, 233, 171, 148, 206, 121, - 248, 156, 241, 102, 207, 161, 192, 185, 120, 153, 4, 40, 136, 194, 50, 95, - 87, 168, 178, 13, 18, 200, 49, 167, 150, 92, 16, 51, 231, 224, 43, 158 -}; - -void BscF::MAC_init() { - for(int i = 0; i < 81; i++) - Q81[i] = T1[i]; -} - - -void BscF::R81_init() { - for(int i = 80; i >= 0; i--) - R81[i] = T1[i]; -} - -void BscF::MAC_step() { - byte zvq81, neq81; - neq81 = T1[Q81[80]]; - zvq81 = Q81[0]; - Q81.Move(); - Q81[80] = zvq81 ^ neq81; - Q81[54] = Q81[54] ^ zvq81; - Q81[49] = Q81[49] ^ zvq81; - Q81[16] = Q81[16] ^ zvq81; -} - -byte BscF::R81_step() { - byte zvr81, ner81; - ner81 = T1[R81[80]]; - zvr81 = R81[0]; - R81.Move(); - R81[80] = zvr81 ^ ner81; - R81[79] = R81[79] ^ zvr81; - R81[48] = R81[48] ^ zvr81; - R81[16] = R81[16] ^ zvr81; - return ner81; -} - -void BscF::R81_start() { - int i; - for(i = 0; i < 81; i++) { - R81_step(); - R81[80] = R81[80] ^ Wk[i % 10]; - } - for(i = 0; i < Krok; i++) - R81_step(); -} - -void BscF::MACDummy() { - for(int k = 0; k < Krok; k++) - MAC_step(); -} - -void BscF::MACGen(const char *s, const char *lim) { - int i; - MAC_init(); - while(s < lim) { - MAC_step(); - Q81[80] = Q81[80] ^ *s++; - } - MACDummy(); - for(i = 0; i < 10; i++) - IV[i] = Q81[80 - i]; -} - -void BscF::Start() { - R81_init(); - R81_start(); -} - -String EncodeBscF(const String& src) { - String result; - BscF f; - const char *lim = src.End(); - f.MACGen(src, lim); - memcpy(f.Wk, f.IV, 10); - f.Start(); - result.Cat((const char *)f.IV, 10); - for(const char *s = src; s < lim; s++) - result.Cat(*s ^ f.R81_step()); - for(int i = 0; i < 10; i++) - result.Cat(f.IV[i] ^ f.R81_step()); - return result; -} - -String DecodeBscF(const String& src) { - if(src.GetLength() <= 20) - return String::GetVoid(); - BscF f; - String result; - const char *s = ~src + 10; - const char *lim = src.End() - 10; - f.MAC_init(); - memcpy(f.Wk, src, 10); - f.Start(); - while(s < lim) { - byte b = *s++ ^ f.R81_step(); - result.Cat(b); - f.MAC_step(); - f.Q81[80] ^= b; - } - f.MACDummy(); - for(int i = 0; i < 10; i++) - if((byte)*s++ != (f.R81_step() ^ f.Q81[80 - i])) return String::GetVoid(); - return result; -} - -END_UPP_NAMESPACE diff --git a/archive/uppsrc/Crypto/Copying b/archive/uppsrc/Crypto/Copying deleted file mode 100644 index f135f3633..000000000 --- a/archive/uppsrc/Crypto/Copying +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 1998-2008 The U++ Project. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted -provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other materials - provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE U++ PROJECT ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD PROJECT OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/archive/uppsrc/Crypto/Crypto.dsp b/archive/uppsrc/Crypto/Crypto.dsp deleted file mode 100644 index 911a47a2c..000000000 --- a/archive/uppsrc/Crypto/Crypto.dsp +++ /dev/null @@ -1,104 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Crypto" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=Crypto - 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 "Crypto.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 "Crypto.mak" CFG="Crypto - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Crypto - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "Crypto - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Crypto - Win32 Release" - -# PROP BASE Use_MFC 2 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 1 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x405 /d "NDEBUG" /d "_AFXDLL" -# ADD RSC /l 0x405 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "Crypto - Win32 Debug" - -# PROP BASE Use_MFC 2 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 1 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "_AFXDLL" -# ADD RSC /l 0x405 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "Crypto - Win32 Release" -# Name "Crypto - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\BscF.cpp -# End Source File -# Begin Source File - -SOURCE=.\Sha1.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\INCLUDE\Crypto.h -# End Source File -# End Group -# End Target -# End Project diff --git a/archive/uppsrc/Crypto/Crypto.h b/archive/uppsrc/Crypto/Crypto.h deleted file mode 100644 index ed09523ed..000000000 --- a/archive/uppsrc/Crypto/Crypto.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef CRYPTO_H -#define CRYPTO_H - -#include - -NAMESPACE_UPP - -void SHA1Transform(dword state[5], byte buffer[64]); -void SHA1Init(dword state[5]); -void SHA1Size(byte buffer[64], dword size); -String SHA1(const void *s, dword size); -String SHA1(const String& s); - -class Sha1 { - dword state[5]; - byte buffer[64]; - int pos; - dword size; - -public: - void Put(const void *data, dword length); - void Put(const String& s) { Put(s, s.GetLength()); } - String Finish(); - dword GetSize() { return size; } - - Sha1(); - ~Sha1(); -}; - -String EncodeBscF(const String& src); -String DecodeBscF(const String& src); - -END_UPP_NAMESPACE - -#endif diff --git a/archive/uppsrc/Crypto/Crypto.upp b/archive/uppsrc/Crypto/Crypto.upp deleted file mode 100644 index 20bf39e61..000000000 --- a/archive/uppsrc/Crypto/Crypto.upp +++ /dev/null @@ -1,10 +0,0 @@ -uses - Core; - -file - Crypto.h, - BscF.cpp, - Sha1.cpp, - Info readonly separator, - Copying; - diff --git a/archive/uppsrc/Crypto/Sha1.cpp b/archive/uppsrc/Crypto/Sha1.cpp deleted file mode 100644 index b1753ea53..000000000 --- a/archive/uppsrc/Crypto/Sha1.cpp +++ /dev/null @@ -1,176 +0,0 @@ -#include "Crypto.h" - - -NAMESPACE_UPP - -/* -SHA-1 in C -By Steve Reid -100% Public Domain - -Test Vectors (from FIPS PUB 180-1) -"abc" - A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D -"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" - 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 -A million repetitions of "a" - 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F -*/ - -/* Hash a single 512-bit block. This is the core of the algorithm. */ -/* blk0() and blk() perform the initial expand. */ -/* I got the idea of expanding during the round function from SSLeay */ - -#ifdef COMPILER_MSC -#define rol(value, bits) _rotl(value, bits) -#else -#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) -#endif - -#define blk0(i) (block[i] = (rol(block[i],24)&0xFF00FF00)|(rol(block[i],8)&0x00FF00FF)) -#define blk(i) (block[i&15] = rol(block[(i+13)&15]^block[(i+8)&15] \ - ^block[(i+2)&15]^block[i&15],1)) -#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); -#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); -#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); -#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); -#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); - -void SHA1Transform(dword state[5], byte buffer[64]) { - dword a, b, c, d, e; - dword *block = (dword *)buffer; - a = state[0]; - b = state[1]; - c = state[2]; - d = state[3]; - e = state[4]; - /* 4 rounds of 20 operations each. Loop unrolled. */ - R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3); - R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7); - R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11); - R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15); - R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19); - R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23); - R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27); - R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31); - R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35); - R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39); - R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43); - R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47); - R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51); - R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55); - R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59); - R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63); - R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67); - R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71); - R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75); - R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79); - state[0] += a; - state[1] += b; - state[2] += c; - state[3] += d; - state[4] += e; - a = b = c = d = e = 0; -} - -void SHA1Init(dword state[5]) { - state[0] = 0x67452301; - state[1] = 0xEFCDAB89; - state[2] = 0x98BADCFE; - state[3] = 0x10325476; - state[4] = 0xC3D2E1F0; -} - -void SHA1Size(byte buffer[64], dword size) { - buffer[63] = byte(size << 3); - buffer[62] = byte(size >> 5); - buffer[61] = byte(size >> 13); - buffer[60] = byte(size >> 21); - buffer[59] = byte(size >> 29); - buffer[58] = 0; - buffer[57] = 0; - buffer[56] = 0; -} - -String SHA1Result(dword state[5]) { - String r; - for(int i = 0; i < 5; i++) { - const byte *h = (const byte *)&state[i]; - if(i) r.Cat(' '); - r.Cat(Format("%02X%02X%02X%02X", h[3], h[2], h[1], h[0])); - } - return r; -} - -String SHA1(const void *data, dword length) { - dword state[5]; - byte buffer[64]; - dword pos = 0; - SHA1Init(state); - const char *s = (const char *) data; - dword size = length; - while(size >= 64) { - memcpy(buffer, s, 64); - SHA1Transform(state, buffer); - size -= 64; - s += 64; - } - memcpy(buffer, s, size); - memset(buffer + size, 0, 64 - size); - buffer[size] = 128; - if(size > 55) { - SHA1Transform(state, buffer); - memset(buffer, 0, 64); - } - SHA1Size(buffer, length); - SHA1Transform(state, buffer); - String r = SHA1Result(state); - size = 0; - memset(buffer, 0, sizeof(buffer)); - memset(state, 0, sizeof(state)); - return r; -} - -String SHA1(const String& s) { - return SHA1(s, s.GetLength()); -} - -String Sha1::Finish() { - memset(buffer + pos, 0, 64 - pos); - buffer[pos] = 128; - if(pos > 55) { - SHA1Transform(state, buffer); - memset(buffer, 0, 64); - } - SHA1Size(buffer, size); - SHA1Transform(state, buffer); - return SHA1Result(state); -} - -void Sha1::Put(const void *data, dword length) { - const byte *s = (const byte *)data; - size += length; - while(pos + length >= 64) { - int n = 64 - pos; - memcpy(buffer + pos, s, n); - SHA1Transform(state, buffer); - s += n; - length -= n; - pos = 0; - } - memcpy(buffer + pos, s, length); - pos += length; -} - -Sha1::Sha1() { - SHA1Init(state); - pos = 0; - size = 0; -} - -Sha1::~Sha1() { - memset(buffer, 0, sizeof(buffer)); - memset(state, 0, sizeof(state)); -} - -END_UPP_NAMESPACE diff --git a/archive/uppsrc/Docedit/Copying b/archive/uppsrc/Docedit/Copying deleted file mode 100644 index 82aabaae4..000000000 --- a/archive/uppsrc/Docedit/Copying +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 2021, The U++ Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted -provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other materials provided - with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/archive/uppsrc/Docedit/DocItem.cpp b/archive/uppsrc/Docedit/DocItem.cpp deleted file mode 100644 index f74185469..000000000 --- a/archive/uppsrc/Docedit/DocItem.cpp +++ /dev/null @@ -1,346 +0,0 @@ -#include "Docedit.h" - -#define IMAGECLASS DppImg -#define IMAGEFILE -#include - -bool IsCppKeyword(const String& id) -{ - static Index kw; - if(kw.GetCount() == 0) - for(int i = 0; CppKeyword[i]; i++) - kw.Add(CppKeyword[i]); - return kw.Find(id) >= 0; -} - -void DocItemDisplay::Paint(Draw& w, const Rect& r, const Value& q, - Color _ink, Color paper, dword style) const -{ - ValueArray va = q; - String txt = va.Get(0); - String name = va.Get(1); - int kind = va.Get(2); - int access = va.Get(3); - int status = va.Get(4); - String pname = va.Get(5); - String tname = va.Get(6); - Color c = Color(230, 255, 230); - switch(status) { - case DocDir::IGNORED: c = SGray; break; - case DocDir::OBSOLETELINK: - case DocDir::OBSOLETE: c = SLtRed; break; - case DocDir::UNDOCUMENTED: c = paper; break; - } - w.DrawRect(r, style & (FOCUS|CURSOR) ? paper : c); - if(IsNull(q)) return; - int x0 = r.left; - if(access == PROTECTED) - w.DrawImage(x0, r.top + 1, DppImg::Protected()); - x0 += 6; - Image img = DppImg::Other(); - switch(kind) { - case FUNCTION: - img = DppImg::Function(); - break; - case INSTANCEFUNCTION: - img = DppImg::InstanceFunction(); - break; - case CLASSFUNCTION: - img = DppImg::ClassFunction(); - break; - case FUNCTIONTEMPLATE: - img = DppImg::FunctionTemplate(); - break; - case INSTANCEFUNCTIONTEMPLATE: - img = DppImg::InstanceFunctionTemplate(); - break; - case CLASSFUNCTIONTEMPLATE: - img = DppImg::ClassFunctionTemplate(); - break; - case STRUCT: - img = DppImg::Struct(); - break; - case STRUCTTEMPLATE: - img = DppImg::StructTemplate(); - break; - case INSTANCEVARIABLE: - img = DppImg::InstanceVariable(); - break; - case CLASSVARIABLE: - img = DppImg::ClassVariable(); - break; - case VARIABLE: - img = DppImg::Variable(); - break; - case ENUM: - img = DppImg::Enum(); - break; - case INLINEFRIEND: - img = DppImg::InlineFriend(); - break; - case TYPEDEF: - img = DppImg::Typedef(); - break; - case CONSTRUCTOR: - img = DppImg::Constructor(); - break; - case DESTRUCTOR: - img = DppImg::Destructor(); - break; - case MACRO: - img = DppImg::Macro(); - break; - } - if(style & (CURSOR|FOCUS)) - DrawHighlightImage(w, x0, r.top + 1, img); - else - w.DrawImage(x0, r.top + 1, img); - x0 += 20; - int x = x0; - int y = r.top + 2; - const char *s = txt; - while(*s && y < r.bottom) { - Font f = Arial(11); - Color ink = SBlack; - int n = 1; - if(*s >= '0' && *s <= '9') { - while(s[n] >= '0' && s[n] <= '9') - n++; - ink = SRed; - } - else - if(iscid(*s)) { - if(strncmp(s, name, name.GetLength()) == 0 && !iscid(s[name.GetLength()])) { - f = Arial(11).Bold(); - n = name.GetLength(); - name.Clear(); - } - else { - String id; - n = 0; - while(IsAlNum(s[n]) || s[n] == '_') { - id.Cat(s[n]); - n++; - } - if(IsCppKeyword(id)) - ink = SLtBlue; - else - if(InScList(id, pname)) { - ink = SRed; - f = Arial(11).Bold(); - } - else - if(InScList(id, tname)) { - ink = SGreen; - f = Arial(11).Bold(); - } - } - } - else - ink = SMagenta; - if(style & (CURSOR|FOCUS)) ink = _ink; - Size fsz = w.GetTextSize(s, f, n); - if(x + fsz.cx >= r.right && fsz.cx < r.Width()) { - if(x0 + 70 < r.right) - x = x0 + 24; - else - x = x0; - y += fsz.cy; - } - w.DrawText(x, y, s, f, ink, n); - x += fsz.cx; - s += n; - } -} - -void DocNestDisplay::Paint(Draw& w, const Rect& r, const Value& q, - Color _ink, Color paper, dword style) const -{ - String text = q; - w.DrawRect(r, paper); - if(IsNull(text)) { - w.DrawText(r.left, r.top, "Globals", Arial(11).Bold().Italic(), - style & (CURSOR|FOCUS) ? _ink : SBlue); - return; - } - int x = r.left; - int y = r.top; - const char *s = text; - Font idf = Arial(11).Bold(); - Color idink = SBlack; - while(*s && y < r.bottom) { - Font f = Arial(11); - Color ink = SBlack; - int n = 1; - if(*s >= '0' && *s <= '9') { - while(s[n] >= '0' && s[n] <= '9') - n++; - ink = SRed; - } - else - if(iscid(*s)) { - String id; - n = 0; - while(IsAlNum(s[n]) || s[n] == '_') { - id.Cat(s[n]); - n++; - } - if(IsCppKeyword(id)) { - ink = SLtBlue; - if(id == "class" || id == "typename") - idink = SGreen; - } - else { - ink = idink; - f = idf; - idink = SBlack; - idf = Arial(11); - } - } - else { - ink = SMagenta; - if(*s == ':') { - idf = Arial(11).Bold(); - idink = SBlack; - } - } - if(style & (CURSOR|FOCUS)) ink = _ink; - Size fsz = w.GetTextSize(s, f, n); - w.DrawText(x, y, s, f, ink, n); - x += fsz.cx; - s += n; - } -} - -int GetItemHeight(const String& txt, const String& nm, const String& pname, - const String& tname, int cx) -{ - String name = nm; - int x = 26; - int y = ScreenInfo().GetFontInfo(Arial(11)).GetHeight() + 3; - const char *s = txt; - while(*s) { - Font f = Arial(11); - int n = 1; - if(*s >= '0' && *s <= '9') - while(s[n] >= '0' && s[n] <= '9') - n++; - else - if(iscid(*s)) { - if(strncmp(s, name, name.GetLength()) == 0 && !iscid(s[name.GetLength()])) { - f = Arial(11).Bold(); - n = name.GetLength(); - name.Clear(); - } - else { - String id; - n = 0; - while(IsAlNum(s[n]) || s[n] == '_') { - id.Cat(s[n]); - n++; - } - if(!IsCppKeyword(id) && InScList(id, pname) || InScList(id, tname)) - f = Arial(11).Bold(); - } - } - Size fsz = ScreenInfo().GetTextSize(s, f, n); - if(x + fsz.cx >= cx && fsz.cx < cx) { - if(26 + 70 < cx) - x = 26 + 24; - else - x = 26; - y += fsz.cy; - } - x += fsz.cx; - s += n; - } - return y; -} - -void InitItemArray(ArrayCtrl& item) -{ - item.NoHeader(); - item.AddIndex(); - item.AddIndex().Accel(); - item.AddIndex(); - item.AddIndex(); - item.AddIndex(); - item.AddIndex(); - item.AddIndex(); - item.AddIndex(); - item.AddIndex(); - item.AddColumnAt(0, "").Add(1).Add(2).Add(3).Add(4).Add(5).Add(6).Add(7).Add(8) - .SetDisplay(Single()).Accel().HeaderTab().SetMargin(0); - item.HeaderObject().Tab(0).SetMargin(0); -} - -void LoadItems(const DocSet& set, const String& nameing, const String& nesting, ArrayCtrl& item) -{ - const ArrayMap& nt = set.Get(~nameing).Get(nesting); - item.Clear(); - int cx = item.HeaderObject().GetTabWidth(0) - 2 * item.HeaderObject().Tab(0).GetMargin(); - for(int i = 0; i < nt.GetCount(); i++) { - const DocItem& im = nt[i]; - if(im.cppitem) { - item.Add(nt.GetKey(i), im.cppitem->name, im.cppitem->kind, im.cppitem->access, - im.status, im.cppitem->pname, im.cppitem->tname, - im.package, im.cppitem->file, im.cppitem->line); - item.SetLineCy(item.GetCount() - 1, - GetItemHeight(nt.GetKey(i), im.cppitem->name, - im.cppitem->pname, im.cppitem->tname, cx)); - } - else { - item.Add(nt.GetKey(i), Null, Null, Null, im.status, Null, Null, im.package, - Null, Null); - item.SetLineCy(item.GetCount() - 1, - GetItemHeight(nt.GetKey(i), Null, Null, Null, cx)); - } - } -} - -int ByOrder(int a1, int a2, int *order) -{ - if(a1 == a2) return 0; - while(*order != -1) { - if(a1 == *order) return -1; - if(a2 == *order) return 1; - order++; - } - return 0; -} - -int CompareItems(const Vector& row1, const Vector& row2) -{ - int q; - int status_order[] = { - STATUS_UNDOCUMENTED, STATUS_OBSOLETE, STATUS_IGNORED, STATUS_EXTERNAL, STATUS_NORMAL, - -1 - }; - int kind1 = row1[2]; - int kind2 = row2[2]; - if(kind1 != STRUCT && kind2 != STRUCT && kind1 != STRUCTTEMPLATE && kind2 != STRUCTTEMPLATE) { - q = (int)row2[3] - (int)row1[3]; - if(q) return q; - q = ByOrder(row1[4], row2[4], status_order); - if(q) return q; - } - int kind_order[] = { - STRUCT, STRUCTTEMPLATE, - MACRO, - CONSTRUCTOR, DESTRUCTOR, - ENUM, TYPEDEF, - INSTANCEFUNCTION, CLASSFUNCTION, INLINEFRIEND, - INSTANCEVARIABLE, CLASSVARIABLE, - INSTANCEFUNCTION, INSTANCEVARIABLE, - VARIABLE, FUNCTION, FUNCTIONTEMPLATE, - -1 - }; - q = ByOrder(kind1, kind2, kind_order); - if(q) return q; - return strcmp((String)row1[1], (String)row2[1]); -} - -int CompareNests(const Value& v1, const Value& v2) -{ - return strcmp(String(v1), String(v2)); -} diff --git a/archive/uppsrc/Docedit/DocLink.cpp b/archive/uppsrc/Docedit/DocLink.cpp deleted file mode 100644 index 4624c1fae..000000000 --- a/archive/uppsrc/Docedit/DocLink.cpp +++ /dev/null @@ -1,114 +0,0 @@ -#include "Docedit.h" - -void DocLinkDlg::Nameing() -{ - nesting.Clear(); - if(IsNull(nameing)) { - Nesting(); - return; - } - const VectorMap >& ns = set->Get(~nameing); - nesting.Clear(); - for(int i = 0; i < ns.GetCount(); i++) - nesting.Add(ns.GetKey(i)); - nesting.Sort(0, CompareNests); - nesting.GoBegin(); - Nesting(); -} - -void DocLinkDlg::Nesting() -{ - item.Clear(); - if(!nesting.IsCursor()) { - Item(); - return; - } - LoadItems(*set, ~nameing, nesting.GetKey(), item); - if(sort) - item.Sort(CompareItems); - item.GoBegin(); -} - -String DocLinkDlg::Get() -{ - return "dpp://" + String(~nameing) + "/" + String(nesting.GetKey()) + "/" - + String(item.GetKey()); -} - -void DocLinkDlg::Item() -{ - link <<= Get(); - String s = doc_dir.GetText(DocKey(~nameing, nesting.GetKey(), item.GetKey(), lang)); - label.KillCursor(); - label.Clear(); - label.Disable(); - if(IsNull(s)) return; - Array pi = ParseQTF(s).GetPosInfo(Rect(0, 0, 5000, 5000), PageY()); - for(int i = 0; i < pi.GetCount(); i++) - if(pi[i].type == RichPosInfo::LABEL) - label.Add(FromUnicode(pi[i].data, CHARSET_WIN1252)); - if(label.GetCount()) - label.Enable(); -} - -void DocLinkDlg::Label() -{ - if(label.IsCursor()) - link <<= Get() + "#" + String(label.GetKey()); -} - -bool DocLinkDlg::Perform(const DocSet& _set, bool _sort, String& _link, dword _lang, - const String& _nameing, const String& _nesting) -{ - lang = _lang; - set = &_set; - sort = _sort; - nameing.Clear(); - for(int i = 0; i < _set.GetCount(); i++) - nameing.Add(_set.GetKey(i)); - if(nameing.GetCount()) - nameing.SetIndex(0); - if(!IsNull(_nameing) && nameing.HasKey(_nameing)) - nameing <<= _nameing; - Nameing(); - if(!IsNull(_nesting)) - nesting.FindSetCursor(_nesting); - link <<= _link; - link.SetFocus(); - if(Execute() == IDOK) { - link.AddHistory(); - _link = link; - return true; - } - return false; -} - -DocLinkDlg::DocLinkDlg() -{ - CtrlLayoutOKCancel(*this, "Link"); - nesting.AddColumn().SetDisplay(Single()); - nesting.NoHeader().NoGrid(); - nameing <<= THISBACK(Nameing); - nesting.WhenEnterRow = THISBACK(Nesting); - InitItemArray(item); - item.WhenLeftClick = THISBACK(Item); - label.NoHeader().NoGrid(); - label.AddColumn(); - label.WhenLeftClick = THISBACK(Label); -} - -bool ParseLink(const String& link, DocKey& key, String& label) -{ - if(memcmp(link, "dpp://", 6)) return false; - Vector p = Split(~link + 6, '/', false); - if(p.GetCount() != 3) return false; - key.nameing = p[0]; - key.nesting = p[1]; - key.item = p[2]; - int q = key.item.Find('#'); - label = Null; - if(q < 0) return true; - label = key.item.Mid(q + 1); - key.item = key.item.Mid(0, q); - return true; -} diff --git a/archive/uppsrc/Docedit/Docbase.cpp b/archive/uppsrc/Docedit/Docbase.cpp deleted file mode 100644 index 67f9edb32..000000000 --- a/archive/uppsrc/Docedit/Docbase.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "Docedit.h" - -String PackageDirectory(const String& name) -{ - return AppendFileName("F:/uppsrc", name); -} - -String SourcePath(const String& package, const String& name) -{ - return AppendFileName(PackageDirectory(package), name); -} - -String CommonPath(const String& filename) -{ - return AppendFileName("f:/theide", filename); -} - -DocBase doc_base; - -void DocBase::RemoveFile(const String& file) -{ - CppBase base; - CppBase& doc_base = *this; - for(int i = 0; i < doc_base.GetCount(); i++) { - String m = doc_base.GetKey(i); - CppNamespace& mm = doc_base[i]; - for(int i = 0; i < mm.GetCount(); i++) { - String n = mm.GetKey(i); - CppNest& nn = mm[i]; - for(int i = 0; i < nn.GetCount(); i++) { - CppItem& q = nn[i]; - if(q.file != file) - base.GetAdd(m).GetAdd(n).GetAdd(nn.GetKey(i)) = q; - } - } - } - doc_base = base; -} - -void DocBase::ParseFile(const String& file, const String& package) throw(CParser::Error) -{ - Parse(FileIn(file), ignore, doc_base, package, file); -} - -void DocBase::RefreshFile(const String& file, const String& package) throw(CParser::Error) -{ - RemoveFile(file); - ParseFile(file, package); -} - -Vector DocBase::GetHeaders() -{ - Index h; - for(int i = 0; i < doc_base.GetCount(); i++) { - String m = doc_base.GetKey(i); - CppNamespace& mm = doc_base[i]; - for(int i = 0; i < mm.GetCount(); i++) { - String n = mm.GetKey(i); - CppNest& nn = mm[i]; - for(int i = 0; i < nn.GetCount(); i++) { - h.FindAdd(nn[i].file); - } - } - } - return h.PickKeys(); -} diff --git a/archive/uppsrc/Docedit/Docdir.cpp b/archive/uppsrc/Docedit/Docdir.cpp deleted file mode 100644 index 391afff99..000000000 --- a/archive/uppsrc/Docedit/Docdir.cpp +++ /dev/null @@ -1,511 +0,0 @@ -#include "Docedit.h" - -bool DocKey::operator==(const DocKey& b) const -{ - return nameing == b.nameing && nesting == b.nesting && item == b.item && lang == b.lang; -} - -dword GetHashValue(const DocKey& k) -{ - return CombineHash(GetHashValue(k.nameing), GetHashValue(k.nesting), - GetHashValue(k.item)) << k.lang; -} - -int CharFilterNameing(int c) -{ - return c == ':' ? '_' : c; -} - -String DocFile(const String& package, const String& name) -{ - return AppendFileName(SourcePath(package, "doc.dpp"), name); -} - -Time GetFileTime(const char *path) -{ - FindFile ff(path); - return ff ? Time(ff.GetLastWriteTime()) : Null; -} - -void CreateDocDir(const String& package) -{ - ::CreateDirectory(SourcePath(package, "doc.dpp"), 0); -} - -String AsCode(const DocKey& k) -{ - return AsCString(k.nameing) + ", " + AsCString(k.nesting) + ", " + - AsCString(k.item) + ", " + AsCString(LNGAsText(k.lang)); -} - -bool ReadCode(CParser& p, DocKey& key) -{ - if(!p.IsString()) return false; - key.nameing = p.ReadString(); - if(!p.Char(',') || !p.IsString()) return false; - key.nesting = p.ReadString(); - if(!p.Char(',') || !p.IsString()) return false; - key.item = p.ReadString(); - if(!p.Char(',') || !p.IsString()) return false; - key.lang = LNGFromText(p.ReadString()); - return true; -} - -void DocDir::SaveLinks(const String& package) const -{ - CreateDocDir(package); - FileOut out(DocFile(package, "links")); - int q = dir.Find(package); - if(q >= 0) { - const ArrayMap& p = dir[q]; - for(int i = 0; i < p.GetCount(); i++) { - const Entry& w = p[i]; - const DocKey& k = p.GetKey(i); - if(w.type == LINK) - out << "LINK(" << AsCode(k) << ", " << AsCString(w.text) << ")\r\n"; - if(w.type == IGNORED) - out << "IGNORED(" << AsCode(k) << ")\r\n"; - } - } -} - -void DocDir::SaveDir(const String& package) const -{ - CreateDocDir(package); - FileOut out(DocFile(package, "dir.h")); - int q = dir.Find(package); - if(q >= 0) { - const ArrayMap& p = dir[q]; - for(int i = 0; i < p.GetCount(); i++) { - const Entry& w = p[i]; - if(w.type == NORMAL || w.type == EXTERNAL) { - const DocKey& k = p.GetKey(i); - out << "#ifdef INCLUDE_NAMESPACE_" << - Filter(k.nameing, CharFilterNameing) << "\r\n"; - out << "//" << k.item << "\r\n"; - out << "//" << k.nesting << "\r\n"; - out << "//" << k.nameing << "\r\n"; - out << "#include \"doc.dpp/"; - out << w.text; - out << "\" //"; - if(w.type == EXTERNAL) - out << "*"; - out << LNGAsText(k.lang) << "\r\n"; - out << "#endif\r\n\r\n"; - } - } - } - SaveLinks(package); -} - -bool DocDir::LoadLinks(const String& package) -{ - String f = LoadFile(DocFile(package, "links")); - CParser p(f); - ArrayMap& pk = dir.GetAdd(package); - try { - while(!p.IsEof()) { - if(p.Id("LINK")) { - DocKey key; - p.PassChar('('); - if(!ReadCode(p, key)) return false; - p.PassChar(','); - String link = p.ReadString(); - p.PassChar(')'); - Entry& e = pk.GetAdd(key); - e.text = link; - e.type = LINK; - } - if(p.Id("IGNORED")) { - DocKey key; - p.PassChar('('); - if(!ReadCode(p, key)) return false; - p.PassChar(')'); - Entry& e = pk.GetAdd(key); - e.text.Clear(); - e.type = IGNORED; - } - } - return true; - } - catch(CParser::Error) { - return false; - } -} - -bool DocDir::LoadDir(const String& package) -{ - ArrayMap& p = dir.GetAdd(package); - p.Clear(); - LoadLinks(package); - FileIn in(DocFile(package, "dir.h")); - int q = 0; - String d[3]; - while(!in.IsEof()) { - String l = in.GetLine(); - if(memcmp(l, "#include ", 9) == 0) { - const char *b = strchr(l, '/'); - if(!b) return false; - const char *e = strchr(b + 1, '\"'); - if(!e) return false; - String fn = String(b + 1, e); - e = strchr(e, '/'); - if(!e || e[1] != '/') return false; - e += 2; - int type = NORMAL; - if(*e == '*') { - type = EXTERNAL; - e++; - } - Entry& w = p.GetAdd(DocKey(d[2], d[1], d[0], LNGFromText(e))); - w.text = fn; - w.type = type; - q = 0; - } - if(l[0] == '/' && l[1] == '/') { - if(q >= 3) return false; - d[q] = l.Mid(2); - q++; - } - } - return true; -} - -int DocDir::ReadDocHeader(const char *filename, DocKey& key) -{ - FileIn in(filename); - if(!in) return -1; - String l = in.GetLine(); - CParser p(l); - if(!p.Id("ITEM") || !p.Char('(') || !ReadCode(p, key)) return -1; - p.Char(')'); - if(p.Id("EXTERNAL")) - return EXTERNAL; - return NORMAL; -} - -void DocDir::RebuildDir(const String& package) -{ - FindFile ff(DocFile(package, "*.dpp")); - Progress pi("Rebuilding " + package + " doc directory %d"); - ArrayMap& p = dir.GetAdd(package); - p.Clear(); - LoadLinks(package); - while(ff) { - DocKey key; - pi.Step(); - int q = ReadDocHeader(DocFile(package, ff.GetName()), key); - if(q >= 0) { - Entry& w = p.GetAdd(key); - w.text = ff.GetName(); - w.type = q; - } - ff.Next(); - } - SaveDir(package); -} - -void DocDir::Refresh(const String& package) -{ - FindFile ff(DocFile(package, "dir.h")); - if(!ff) { - RebuildDir(package); - return; - } - FileTime dirtime = ff.GetLastWriteTime(); - ff.Search(DocFile(package, "links")); - if(ff && ff.GetLastWriteTime() > dirtime) { - RebuildDir(package); - return; - } - const ArrayMap& p = dir.GetAdd(package); - Index dfn; - for(int i = 0; i < p.GetCount(); i++) - if(p[i].type == NORMAL || p[i].type == EXTERNAL) - dfn.Add(p[i].text); - ff.Search(DocFile(package, "*.dpp")); - int count = 0; - while(ff) { - DocKey key; - if(dfn.Find(ff.GetName()) >= 0) - if(ff.GetLastWriteTime() > dirtime) { - RebuildDir(package); - return; - } - else - count++; - else - if(ReadDocHeader(DocFile(package, ff.GetName()), key) >= 0) { - RebuildDir(package); - return; - } - ff.Next(); - } - if(count != dfn.GetCount()) - RebuildDir(package); -} - -int CharFilterLNG_(int c) -{ - return c == '-' ? '_' : c; -} - -String DocDir::GetAddFileName(const String& package, const DocKey& key, int type) -{ - Entry& w = dir.GetAdd(package).GetAdd(key); - String& fn = w.text; - w.type = type; - if(!IsEmpty(fn)) return fn; - String nm = key.nameing + '_' + key.nesting + '_' + key.item; - String n; - const char *s = nm; - while(*s && n.GetLength() < 30) - if(iscid(*s)) - n.Cat(*s++); - else { - n.Cat('_'); - while(*s && !iscid(*s)) - s++; - } - n << '_' << LNGAsText(key.lang); - int i = 0; - for(;;) { - fn = n + FormatIntAlpha(i) + ".dpp"; - if(!FindFile(DocFile(package, fn))) - return fn; - i++; - } -} - -bool DocDir::GetFileName(const DocKey& key, String& fn, String& package) -{ - dword hv = GetHashValue(key); - for(int i = 0; i < dir.GetCount(); i++) { - const ArrayMap& p = dir[i]; - int q = p.Find(key, hv); - if(q >= 0) { - fn = p[q].text; - package = dir.GetKey(i); - return true; - } - } - return false; -} - -void DocDir::RemoveOtherKey(const DocKey& key, int t1, int t2) -{ - dword hv = GetHashValue(key); - for(int i = 0; i < dir.GetCount(); i++) { - int q = dir[i].Find(key, hv); - if(q >= 0) { - Entry& e = dir[i][q]; - if(e.type != t1 && e.type != t2) { - if(e.type == NORMAL || e.type == EXTERNAL) - DeleteFile(DocFile(dir.GetKey(i), dir[i][q].text)); - dir[i].Remove(q); - } - SaveDir(dir.GetKey(i)); - SaveLinks(dir.GetKey(i)); - } - } -} - -void DocDir::Remove(const DocKey& k) -{ - RemoveOtherKey(k, UNDOCUMENTED, UNDOCUMENTED); -} - -void DocDir::SaveText(const String& package, const DocKey& k, const String& text, bool external) -{ - RemoveOtherKey(k, NORMAL, EXTERNAL); - CreateDocDir(package); - String fn = DocFile(package, GetAddFileName(package, k, external ? EXTERNAL : NORMAL)); - FileOut out(fn); - out << "ITEM(" << AsCode(k) << ")"; - if(external) - out << " EXTERNAL"; - out << "\r\n"; - int n = 0; - for(;;) { - int m = min(text.GetLength() - n, 2048); - if(m == 0) break; - out << "TEXT(\r\n\t"; - out << AsCString(~text + n, ~text + n + m, 64, "\t") << "\r\n"; - out << ")\r\n"; - n += m; - } - out << "END_ITEM\r\n"; - SaveDir(package); - SaveLinks(package); -} - -void DocDir::SaveLink(const String& package, const DocKey& key, const String& text) -{ - RemoveOtherKey(key, LINK); - Entry& w = dir.GetAdd(package).GetAdd(key); - w.text = text; - w.type = LINK; - SaveLinks(package); -} - -void DocDir::Ignore(const String& package, const DocKey& key) -{ - RemoveOtherKey(key, IGNORED); - Entry& w = dir.GetAdd(package).GetAdd(key); - w.type = IGNORED; - SaveLinks(package); -} - -DocDir::Entry *DocDir::Find(const DocKey& key, String& package) const -{ - dword hv = GetHashValue(key); - for(int i = 0; i < dir.GetCount(); i++) { - int q = dir[i].Find(key, hv); - if(q >= 0) { - package = dir.GetKey(i); - return const_cast(&dir[i][q]); - } - } - return NULL; -} - -DocDir::Entry *DocDir::Find(const DocKey& key) const -{ - String dm; - return Find(key, dm); -} - -int DocDir::GetStatus(const DocKey& key) -{ - DocDir::Entry *e = Find(key); - return e ? e->type : UNDOCUMENTED; -} - -int DocDir::GetStatus(const String& nameing, const String& nesting, const String& item, - int lang) -{ - return GetStatus(DocKey(nameing, nesting, item, lang)); -} - -String DocDir::GetFilePath(const DocKey& key) const -{ - String package; - Entry *e = Find(key, package); - if(!e || e->type != NORMAL && e->type != EXTERNAL) return Null; - return DocFile(package, e->text); -} - -String DocDir::GetPackage(const DocKey& key) const -{ - String package; - Entry *e = Find(key, package); - return e ? package : Null; -} - -String DocDir::GetText(const DocKey& key) const -{ - String s = LoadFile(GetFilePath(key)); - if(s.IsEmpty()) return Null; - CParser p(s); - DocKey dummy; - if(!p.Id("ITEM") || !p.Char('(') || !ReadCode(p, dummy)) return "Invalid file"; - p.Char(')'); - p.Id("EXTERNAL"); - String text; - while(p.Id("TEXT")) { - p.Char('('); - if(p.IsString()) - text.Cat(p.ReadString()); - else - return "Invalid file"; - p.Char(')'); - } - return p.Id("END_ITEM") ? text : "Invalid file"; -} - -String DocDir::GetLink(const DocKey& key) const -{ - DocDir::Entry *e = Find(key); - if(!e) return Null; - return e->type == LINK ? e->text : Null; -} - -bool Contains(const DocSet& r, const DocKey& key) -{ - int q = r.Find(key.nameing); - if(q < 0) return false; - int w = r[q].Find(key.nesting); - if(w < 0) return false; - return r[q][w].Find(key.item) >= 0; -} - -bool Contains(const String& big, const String& part) -{ - if(part.GetLength() > big.GetLength()) return false; - const char *s = big; - const char *e = s + big.GetLength() - part.GetLength(); - int l = part.GetLength(); - while(s <= e) { - if(memcmp(s, part, l) == 0) - return true; - s++; - } - return false; -} - -DocSet DocDir::Select(const DocQuery& query) -{ - DocSet r; - CppBase base; - int i; - for(i = 0; i < doc_base.GetCount(); i++) { - String nameing = doc_base.GetKey(i); - CppNamespace& mm = doc_base[i]; - for(int i = 0; i < mm.GetCount(); i++) { - String nesting = mm.GetKey(i); - CppNest& nn = mm[i]; - for(int i = 0; i < nn.GetCount(); i++) { - CppItem& q = nn[i]; - String item = nn.GetKey(i); - if((query.name.IsEmpty() || query.name == q.name) && - (query.text.IsEmpty() || Contains(item, query.text)) && - (query.package.IsEmpty() || q.package.CompareNoCase(query.package) == 0) && - (query.header.IsEmpty() || q.file.CompareNoCase(query.header) == 0)) { - String pk; - const Entry *e = Find(DocKey(nameing, nesting, item, query.lang), pk); - int st = e ? e->type : UNDOCUMENTED; - if((query.undocumented || e) && (st != IGNORED || query.ignored)) { - DocItem& a = r.GetAdd(nameing).GetAdd(nesting).GetAdd(item); - a.cppitem = &q; - a.item = item; - a.status = st; - a.package = e ? pk : q.package; - } - } - } - } - } - for(i = 0; i < dir.GetCount(); i++) { - ArrayMap& pk = dir[i]; - String package = dir.GetKey(i); - for(int j = 0; j < pk.GetCount(); j++) { - const DocKey& k = pk.GetKey(j); - if(k.lang == query.lang && - query.name.IsEmpty() && - (query.text.IsEmpty() || Contains(k.item, query.text)) && - (query.package.IsEmpty() || package.CompareNoCase(query.package) == 0) && - query.header.IsEmpty() && - !Contains(r, k)) { - DocItem& a = r.GetAdd(k.nameing).GetAdd(k.nesting).GetAdd(k.item); - a.cppitem = NULL; - a.item = k.item; - int st = pk[j].type; - a.status = st == NORMAL ? OBSOLETE : st == LINK ? OBSOLETELINK : st; - a.package = package; - } - } - } - return r; -} - -DocDir doc_dir; diff --git a/archive/uppsrc/Docedit/Docedit.cpp b/archive/uppsrc/Docedit/Docedit.cpp deleted file mode 100644 index a8cc8ada5..000000000 --- a/archive/uppsrc/Docedit/Docedit.cpp +++ /dev/null @@ -1,539 +0,0 @@ -#include - -int PosOf(const String& str, const String& sub) -{ - if(sub.GetLength() > str.GetLength()) return -1; - const char *s = str; - const char *e = s + str.GetLength() - sub.GetLength(); - while(s <= e) { - if(memcmp(s, sub, sub.GetLength()) == 0) - return s - ~str; - s++; - } - return -1; -} - -void DocBrowser::Nameing() -{ - nesting.Clear(); - if(IsNull(nameing)) { - Nesting(); - return; - } - const VectorMap >& ns = set.Get(~nameing); - nesting.Clear(); - for(int i = 0; i < ns.GetCount(); i++) - nesting.Add(ns.GetKey(i)); - nesting.Sort(0, CompareNests); - nesting.GoBegin(); - Nesting(); -} - -void DocBrowser::Nesting() -{ - item.Clear(); - if(!nesting.IsCursor()) { - Item(); - return; - } - LoadItems(set, ~nameing, nesting.GetKey(), item); - if(sort) - item.Sort(CompareItems); - item.GoBegin(); - edit.Enable(item.IsCursor()); -} - -void DocBrowser::Item() -{ - Flush(); - EnterItem(); -} - -void DocBrowser::EnterItem() -{ - String lbl; - target = current = DocKey(~nameing, nesting.GetKey(), item.GetKey(), (int)~lang); - if(doc_dir.GetStatus(current) == DocDir::LINK) - if(!ParseLink(doc_dir.GetLink(current), target, lbl)) { - View(); - view.SetQTF("[R9&&&=@3* Invalid link"); - return; - } - String txt = LoadFile(CommonPath("dppstyles.qtf")) + doc_dir.GetText(target); - package <<= doc_dir.GetPackage(target); - if(edit.IsShown()) { - edit.SetPage(Size(3968, INT_MAX)); - edit.SetQTF(txt); - edit.SetFocus(); - String p = doc_dir.GetFilePath(target); - if(!IsNull(p)) { - int q = editstate.Find(p); - if(q >= 0) { - FileInfo& fi = editstate[q]; - if(fi.time == GetFileTime(p)) { - edit.SetPickUndoInfo(fi.info); - fi.time = Time(1, 1, 1); - } - } - } - int q = posinfo.Find(current); - if(q >= 0) - edit.SetPosInfo(posinfo[q]); - else - if(!lbl.IsEmpty()) - edit.GotoLabel(lbl); - edit.ClearModify(); - } - else { - view.SetQTF(txt); - if(!lbl.IsEmpty()) - view.GotoLabel(lbl); - } - trect.Color(SLtBlue); - title.SetInk(SWhite); - String s = " dpp://" + current.nameing + "/" + current.nesting + "/" + current.item; - switch(GetCurrentStatus()) { - case DocDir::UNDOCUMENTED: - trect.Color(SGray); - break; - case DocDir::LINK: - s << " -> " << target.nameing + "/" + target.nesting + "/" + target.item; - trect.Color(SCyan); - break; - case DocDir::OBSOLETE: - trect.Color(SRed); - break; - case DocDir::EXTERNAL: - trect.Color(SGreen); - break; - } - title = s; - int status = item.Get(4); - int kind = item.Get(2); - String name = item.Get(1); - String text = item.Get(0); - String post; - if(status == DocDir::EXTERNAL) - post = " (external)"; - if(!name.IsEmpty() && status != DocDir::EXTERNAL) { - int q = PosOf(text, name); - if(q >= 0) { - if(current.nesting.IsEmpty() || kind == STRUCT || kind == STRUCTTEMPLATE) - Title(text.Mid(0, q) + current.nameing + text.Mid(q) + post); - else - Title(text.Mid(0, q) + current.nameing + current.nesting + "::" + text.Mid(q) - + post); - return; - } - } - Title(current.nameing + "::" + current.nesting + "::" + text + post); -} - -void DocBrowser::Flush() -{ - if(edit.IsShown() && target && item.IsCursor()) { - posinfo.GetAdd(current) = edit.GetPosInfo(); - if(edit.IsModified()) { - DocItem& im = set.Get(target.nameing).Get(target.nesting).Get(target.item); - const RichText& txt = edit.Get(); - SaveFile(CommonPath("dppstyles.qtf"), StylesAsQTF(txt)); - if(edit.GetLength()) { - doc_dir.SaveText(GetItemPackage(), target, BodyAsQTF(txt), - doc_dir.GetStatus(target) == DocDir::EXTERNAL); - im.status = DocDir::NORMAL; - } - else { - doc_dir.Remove(target); - im.status = DocDir::UNDOCUMENTED; - } - String p = doc_dir.GetFilePath(target); - FileInfo& fi = editstate.GetAdd(p); - fi.time = GetFileTime(p); - fi.info = edit.PickUndoInfo(); - } - target.Clear(); - if(edit.IsModified()) - ReloadItems(); - edit.ClearModify(); - } -} - -void DocBrowser::Query() -{ - DocQuery q; - q.lang = (int)~lang; - q.undocumented = q.normal = q.external = q.obsolete = q.ignored = false; - switch(query.status) { - case 4: - q.ignored = true; - case 0: - q.undocumented = q.normal = q.external = q.obsolete = true; - break; - case 1: - q.undocumented = true; - break; - case 2: - q.obsolete = true; - break; - case 3: - q.ignored = true; - break; - } - q.name = query.name; - q.text = query.text; - q.header = ~query.header; - set = doc_dir.Select(q); - nameing.ClearList(); - for(int i = 0; i < set.GetCount(); i++) - nameing.Add(set.GetKey(i)); - if(nameing.GetCount()) - nameing.SetIndex(0); - Nameing(); -} - -void DocBrowser::Select() -{ - int c; - query.header.ClearList(); - Vector h = doc_base.GetHeaders(); - for(int i = 0; i < h.GetCount(); i++) - query.header.Add(h[i], GetFileName(h[i])); - query.header.Add(Null, ""); - for(;;) { - c = query.Run(); - if(c == IDCANCEL) - break;; - if(c == IDYES) { - query.status = 0; - query.name <<= Null; - query.text <<= Null; - } - if(c == IDOK) - break; - } - query.Close(); - query.name.AddHistory(); - query.text.AddHistory(); - if(c == IDOK) - Query(); -} - -bool DocBrowser::Key(dword key, int) -{ - switch(key) { - case K_F6: - Select(); - break; - default: - return false; - } - return true; -} - -void DocBrowser::Edit() -{ - Flush(); - edit.Show(); - view.Hide(); - EnterItem(); -} - -void DocBrowser::View() -{ - view.Show(); - edit.Hide(); - Item(); -} - -void DocBrowser::Sort() -{ - sort = !sort; - Nesting(); -} - -int DocBrowser::GetCurrentStatus() -{ - return item.IsCursor() ? doc_dir.GetStatus(current) : Null; -} - -void DocBrowser::ReloadItems() -{ - int c = item.GetCursor(); - int a = item.GetCursorSc(); - Nesting(); - if(c >= 0) - item.SetCursor(c); - item.ScCursor(a); -} - -void DocBrowser::SetCurrentStatus(int status) -{ - set.GetAdd(current.nameing).GetAdd(current.nesting).GetAdd(current.item).status = status; - ReloadItems(); -} - -void DocBrowser::Link() -{ - int q = GetCurrentStatus(); - if(q != DocDir::UNDOCUMENTED && q != DocDir::LINK || !item.IsCursor()) - return; - String pk = GetItemPackage(); - String h; - if(GetCurrentStatus() == DocDir::LINK) - h = doc_dir.GetLink(current); - if(linkdlg.Perform(set, sort, h, (int)~lang, ~nameing, nesting.GetKey())) { - int c = item.GetCursor(); - item.KillCursor(); - doc_dir.SaveLink(pk, current, h); - item.SetCursor(c); - SetCurrentStatus(DocDir::LINK); - } -} - -void DocBrowser::Ignore() -{ - int q = GetCurrentStatus(); - if(q != DocDir::UNDOCUMENTED || !item.IsCursor()) return; - int c = item.GetCursor(); - String pk = GetItemPackage(); - item.KillCursor(); - doc_dir.Ignore(pk, current); - item.SetCursor(c); - SetCurrentStatus(DocDir::IGNORED); -} - -void DocBrowser::Delete() -{ - int q = GetCurrentStatus(); - if(q == DocDir::UNDOCUMENTED || !item.IsCursor()) return; - int c = item.GetCursor(); - item.KillCursor(); - switch(q) { - case DocDir::OBSOLETE: - case DocDir::OBSOLETELINK: - break; - default: - if(!PromptYesNo("Remove current current ?")) return; - } - doc_dir.Remove(current); - item.SetCursor(c); - SetCurrentStatus(DocDir::UNDOCUMENTED); -} - -void DocBrowser::New() -{ - - external.package.Add("Core"); //!!! - external.package <<= doc_dir.GetPackage(current); - external.nameing <<= ~nameing; - external.nesting <<= nesting.GetKey(); -again: - if(external.Execute() != IDOK) return; - if(IsNull(external.nameing)) { - Exclamation("Missing namespace !"); - goto again; - } - if(IsNull(external.item)) { - Exclamation("Missing item !"); - goto again; - } - external.nameing.AddHistory(); - external.nesting.AddHistory(); - DocKey k = DocKey(~external.nameing, ~external.nesting, ~external.item, (int)~lang); - doc_dir.SaveText(~external.package, k, "", true); - Query(); - nameing <<= k.nameing; - Nameing(); - if(nesting.FindSetCursor(k.nesting)) - item.FindSetCursor(k.item); -} - -void DocBrowser::EditLink(String& s) -{ - linkdlg.Perform(set, sort, s, (int)~lang, ~nameing, nesting.GetKey()); -} - -void DocBrowser::FollowLink(const String& s) -{ - if(memcmp(s, "dpp://", 6)) { - Exclamation("Not a dpp link !"); - return; - } - Vector l = Split(~s + 6, '/', false); - if(l.GetCount() != 3) { - Exclamation("Invalid link !"); - return; - } - if(nameing.HasKey(l[0])) { - nameing.SetData(l[0]); - Nameing(); - if(nesting.FindSetCursor(l[1])) { - String n = l[2]; - String l; - int q = n.Find('#'); - if(q >= 0) { - l = n.Mid(q + 1); - n = n.Mid(0, q); - } - if(item.FindSetCursor(n)) - return; - } - } - Exclamation("Link not found"); -} - -void DocBrowser::BrowseMenu(Bar& bar) -{ - bar.Add("Select..", THISBACK(Select)) - .Key(K_F6); - bar.Separator(); - bar.Add("Edit", THISBACK(Edit)) - .Radio(edit.IsShown()) - .Key(K_CTRL_O); - bar.Add("View", THISBACK(View)) - .Radio(view.IsShown()) - .Key(edit.IsShown() ? K_ESCAPE : 0); - bar.Separator(); - bar.Add("Sort by types and names", THISBACK(Sort)) - .Check(sort); - bar.Separator(); -} - -void DocBrowser::ItemMenu(Bar& bar) -{ - int q = GetCurrentStatus(); - bar.Add(q == DocDir::UNDOCUMENTED || q == DocDir::LINK, - "Link..", THISBACK(Link)) - .Key(K_CTRL_L); - bar.Add(q == DocDir::UNDOCUMENTED, "Ignore", THISBACK(Ignore)) - .Key(K_CTRL_I); - bar.Add(q != DocDir::UNDOCUMENTED, "Delete", THISBACK(Delete)) - .Key(K_CTRL_DELETE); - bar.Add("New..", THISBACK(New)); -} - -void DocBrowser::MainMenu(Bar& bar) -{ - bar.Add("Browse", THISBACK(BrowseMenu)); - bar.Add("Item", THISBACK(ItemMenu)); -} - -void DocBrowser::EditBar(Bar& bar) -{ - edit.StyleTool(bar); - bar.Gap(); - edit.FontTools(bar); - bar.Gap(); - edit.InkTool(bar); - edit.PaperTool(bar); - bar.Gap(); - edit.LanguageTool(bar); - edit.SpellCheckTool(bar); - bar.Break(); - - edit.HyperlinkTool(bar, 300); - bar.Gap(); - edit.LabelTool(bar); - bar.Gap(); - edit.IndexEntryTool(bar); - bar.Break(); - - edit.ParaTools(bar); - bar.Gap(); - edit.EditTools(bar); - bar.Gap(); - edit.PrintTool(bar); -} - -void DocBrowser::SetEditBar() -{ - editbar.Set(THISBACK(EditBar)); -} - -void DocBrowser::SetMainBar() -{ - menu.Set(THISBACK(MainMenu)); -} - -void DocBrowser::Close() -{ - Flush(); - TopWindow::Close(); -} - -DocBrowser::DocBrowser() -{ - Zoomable().Sizeable().Icon(DppImg::SmallIcon); - ni_split.Vert(nesting, item); - ni_split.SetPos(3000); - int q = nameing.GetMinSize().cy; - larea.Add(nameing.HSizePos().TopPos(0, q)); - larea.Add(ni_split.HSizePos().VSizePos(q + 4, 0)); - rarea.AddFrame(trect.Height(q + 4)); - trect.SetFrame(ThinInsetFrame()); - trect.Add(title.SizePos()); - trect.Add(package.RightPos(0, 100).VSizePos()); - rarea.Add(view.SizePos()); - rarea.Add(edit.SizePos()); - vi_split.Horz(larea, rarea); - vi_split.SetPos(3000); - Add(vi_split); - nesting.AddColumn().SetDisplay(Single()); - nesting.NoHeader().NoGrid(); - nameing <<= THISBACK(Nameing); - nesting.WhenEnterRow = THISBACK(Nesting); - InitItemArray(item); - item.WhenEnterRow = THISBACK(Item); - item.WhenKillCursor = THISBACK(Flush); - item.WhenBar = THISBACK(ItemMenu); - item.WhenLeftDouble = THISBACK(Edit); - - view.Show(); - edit.Hide(); - edit.SetPage(Size(3968, INT_MAX)); - - CtrlLayoutOKCancel(query, "Select"); - query.clear <<= query.Breaker(IDYES); - query.status = 0; - - AddFrame(menu); - SetMainBar(); - menu.Ctrl::Add(lang.RightPos(10, 70).TopPos(0, EditField::GetStdHeight())); - lang.Add((int)LNG_ENGLISH, "EN-US"); - lang.Add((int)LNGFromText("EN-GB"), "EN-GB"); - lang.Add((int)LNGFromText("DE-DE"), "DE-DE"); - lang.Add((int)LNG_CZECH, "CS-CZ"); - lang <<= (int)LNGFromText("EN-US"); - lang <<= THISBACK(Query); - - edit.InsertFrame(1, editbar); - edit.WhenRefreshBar = THISBACK(SetEditBar); - edit.WhenHyperlink = THISBACK(EditLink); - - view.WhenLink = THISBACK(FollowLink); - - sort = false; - - CtrlLayoutOKCancel(external, "New external item"); - external.ActiveFocus(external.item); -} - -void AppMain() -{ - doc_base.ignore.Add("pick_"); - FindFile ff("f:/uppsrc/Core/*.h"); - while(ff) { - String fn = String("f:/uppsrc/Core/") + ff.GetName(); - try { - doc_base.ParseFile(fn, "Core"); - } - catch(Parser::Error e) { - LOG(e); - } - ff.Next(); - } - doc_dir.Refresh("Core"); - DocBrowser d; - d.Query(); - d.Run(); -} diff --git a/archive/uppsrc/Docedit/Docedit.h b/archive/uppsrc/Docedit/Docedit.h deleted file mode 100644 index 4dcd2341e..000000000 --- a/archive/uppsrc/Docedit/Docedit.h +++ /dev/null @@ -1,241 +0,0 @@ -#include -#include - -#define IMAGECLASS DppImg -#define IMAGEFILE -#include - -// before placed to IDE... - -String SourcePath(const String& package, const String& name); -String PackageDirectory(const String& name); -String CommonPath(const String& filename); - -// ------ - -struct DocBase : public CppBase { - Vector DocBase::ignore; - Vector package; - - void RemoveFile(const String& file); - void ParseFile(const String& file, const String& package) throw(Parser::Error); - void RefreshFile(const String& file, const String& package) throw(Parser::Error); - Vector GetHeaders(); - Vector GetPackages(); -}; - -extern DocBase doc_base; - -Time GetFileTime(const char *path); -String DocFile(const String& package, const String& name); - -struct DocKey { - String nameing; - String nesting; - String item; - dword lang; - - bool operator==(const DocKey& b) const; - dword GetHashValue(const DocKey& k); - operator bool() const { return item.GetLength(); } - void Clear() { item.Clear(); nesting.Clear(); nameing.Clear(); lang = 0; } - - DocKey() {} - DocKey(const String& m, const String& n, const String& s, dword l) - : nameing(m), nesting(n), item(s), lang(l) {} -}; - -dword GetHashValue(const DocKey& k); - -struct DocQuery { - String name, text, package, header; - bool undocumented, normal, external, obsolete, ignored; - dword lang; -}; - -struct DocItem { - CppItem *cppitem; - String item; - int status; - String package; -}; - -typedef VectorMap > > DocSet; - -class DocDir { - struct Entry { - int type; - String text; - }; - VectorMap > dir; - - int ReadDocHeader(const char *filename, DocKey& key); - String GetAddFileName(const String& package, const DocKey& key, int type); - bool GetFileName(const DocKey& key, String& fn, String& package); - - bool LoadLinks(const String& package); - void SaveLinks(const String& package) const; - - void RemoveOtherKey(const DocKey& k, int t1, int t2 = UNDOCUMENTED); - Entry *Find(const DocKey& key, String& package) const; - Entry *Find(const DocKey& key) const; - -public: - enum { - NORMAL, EXTERNAL, LINK, IGNORED, - UNDOCUMENTED = -1, OBSOLETE = -2, OBSOLETELINK = -3 - }; - - bool LoadDir(const String& package); - void SaveDir(const String& package) const; - - void RebuildDir(const String& package); - - void Refresh(const String& package); - - int GetStatus(const DocKey& key); - int GetStatus(const String& nameing, const String& nesting, const String& item, int lang); - - String GetFilePath(const DocKey& key) const; - String GetPackage(const DocKey& key) const; - String GetText(const DocKey& key) const; - String GetLink(const DocKey& key) const; - - void Remove(const DocKey& key); - void SaveText(const String& package, const DocKey& key, const String& text, bool external); - void SaveLink(const String& package, const DocKey& key, const String& text); - void Ignore(const String& package, const DocKey& key); - - DocSet Select(const DocQuery& query); -}; - -bool ParseLink(const String& link, DocKey& key, String& label); - -extern DocDir doc_dir; - -#define LAYOUTFILE "DocEdit.lay" -#include - -struct DocItemDisplay : public Display -{ - virtual void Paint(Draw& w, const Rect& r, const Value& q, - Color _ink, Color paper, dword style) const; -}; - -struct DocNestDisplay : public Display -{ - virtual void Paint(Draw& w, const Rect& r, const Value& q, - Color _ink, Color paper, dword style) const; -}; - -void InitItemArray(ArrayCtrl& item); -void LoadItems(const DocSet& set, const String& nameing, const String& nesting, ArrayCtrl& item); -int PosOf(const String& s, const String& subs); -bool IsCppKeyword(const String& id); -int CompareNests(const Value& v1, const Value& v2); -int CompareItems(const Vector& row1, const Vector& row2); - -struct DocLinkDlg : public WithLinkLayout { - const DocSet *set; - bool sort; - dword lang; - - void Nameing(); - void Nesting(); - void Item(); - bool Perform(const DocSet& set, bool sort, String& link, int lang, - const String& nameing = Null, const String& nesting = Null); - void Label(); - String Get(); - - typedef DocLinkDlg CLASSNAME; - - DocLinkDlg(); -}; - -class DocBrowser : public TopWindow { -public: - virtual bool Key(dword key, int count); - virtual void Close(); - -private: - struct FileInfo { - Time time; - RichEdit::UndoInfo info; - }; - - ArrayMap editstate; - ArrayMap posinfo; - - DropList nameing; - StaticRect larea, rarea; - ArrayCtrl nesting; - ArrayCtrl item; - Splitter ni_split; - Splitter vi_split; - - FrameTop trect; - Label title; - DataPusher package; - RichTextView view; - RichEdit edit; - - DropList lang; - - MenuBar menu; - ToolBar tool; - - ToolBar editbar; - - WithQueryLayout query; - DocSet set; - DocKey current, target; - - DocLinkDlg linkdlg; - - bool sort; - - WithExternalLayout external; - - void Nameing(); - void Nesting(); - void Item(); - void EnterItem(); - - void ReloadItems(); - - DocKey Key(); - void Flush(); - int GetCurrentStatus(); - void SetCurrentStatus(int status); - String GetItemPackage() { return item.Get(7); } - - void EditLink(String& s); - - void Edit(); - void View(); - void Sort(); - void Select(); - void Link(); - void Ignore(); - void Delete(); - void New(); - - void FollowLink(const String& s); - - void SetMainBar(); - - void MainMenu(Bar& bar); - void ItemMenu(Bar& bar); - void BrowseMenu(Bar& bar); - - void EditBar(Bar& bar); - void SetEditBar(); - -public: - typedef DocBrowser CLASSNAME; - - void Query(); - - DocBrowser(); -}; diff --git a/archive/uppsrc/Docedit/Docedit.iml b/archive/uppsrc/Docedit/Docedit.iml deleted file mode 100644 index c3f98a271..000000000 --- a/archive/uppsrc/Docedit/Docedit.iml +++ /dev/null @@ -1,53 +0,0 @@ -PREMULTIPLIED -IMAGE_ID(Variable) -IMAGE_ID(SmallIcon) -IMAGE_ID(InstanceVariable) -IMAGE_ID(ClassVariable) -IMAGE_ID(Function) -IMAGE_ID(InstanceFunction) -IMAGE_ID(InlineFriend) -IMAGE_ID(ClassFunction) -IMAGE_ID(FunctionTemplate) -IMAGE_ID(InstanceFunctionTemplate) -IMAGE_ID(ClassFunctionTemplate) -IMAGE_ID(Enum) -IMAGE_ID(Protected) -IMAGE_ID(Struct) -IMAGE_ID(StructTemplate) -IMAGE_ID(Other) -IMAGE_ID(Typedef) -IMAGE_ID(Constructor) -IMAGE_ID(Destructor) -IMAGE_ID(Macro) - -IMAGE_BEGIN_DATA -IMAGE_DATA(120,156,237,152,11,146,131,32,12,134,115,132,30,185,71,243,102,217,105,187,190,32,228,137,21,107,226,48,221,110,249,18) -IMAGE_DATA(192,248,19,129,7,60,0,0,17,86,67,69,147,236,211,175,117,89,252,112,215,119,124,212,227,246,142,225,181,208,136,30) -IMAGE_DATA(31,103,242,209,249,71,214,223,203,70,242,175,71,254,95,211,8,49,104,153,117,17,202,254,210,119,142,71,152,147,88,199) -IMAGE_DATA(151,201,82,242,136,80,249,235,197,215,137,135,184,182,127,118,110,132,143,8,223,78,126,157,143,40,127,246,252,123,220,191) -IMAGE_DATA(30,60,144,243,226,191,247,230,237,118,64,101,64,239,32,58,101,174,110,60,123,145,137,84,240,54,31,60,175,219,25,169) -IMAGE_DATA(249,45,125,179,50,112,198,182,177,89,25,120,44,95,19,12,201,236,123,24,86,31,223,121,152,35,98,132,65,49,228,121) -IMAGE_DATA(121,253,107,222,126,239,34,155,81,185,126,183,23,3,141,69,22,36,178,160,33,22,245,15,111,119,214,201,111,31,13,107) -IMAGE_DATA(114,238,88,170,113,108,171,5,230,178,140,233,4,22,224,188,188,155,249,241,173,33,6,26,245,108,25,181,59,80,190,61) -IMAGE_DATA(188,114,23,37,121,75,50,149,243,79,49,72,49,184,173,24,72,118,187,202,96,154,166,16,235,21,131,153,221,196,87,139) -IMAGE_DATA(193,150,165,62,57,182,213,12,115,169,229,199,42,200,126,182,246,225,207,157,8,187,245,49,190,165,24,124,135,205,202,96) -IMAGE_DATA(29,211,134,181,60,104,53,203,87,160,21,95,244,177,240,212,239,86,158,243,59,134,88,12,46,6,229,98,181,18,73,149) -IMAGE_DATA(76,198,221,125,23,171,96,45,177,223,172,179,178,88,88,111,101,192,53,142,109,181,192,92,150,49,41,88,106,126,220,61) -IMAGE_DATA(80,197,86,246,37,99,7,226,206,204,248,118,128,24,136,73,202,254,70,157,70,235,197,128,61,111,80,36,98,243,188,193) -IMAGE_DATA(32,6,100,18,167,24,172,99,82,176,41,6,103,88,86,6,170,113,102,101,160,23,3,110,92,50,75,111,6,20,75,197) -IMAGE_DATA(57,236,240,89,136,187,247,65,141,235,10,230,20,131,163,141,75,124,233,97,144,94,149,171,86,248,40,255,159,241,239,21) -IMAGE_DATA(31,12,113,61,2,63,174,213,98,240,124,125,193,167,123,146,31,254,253,151,203,71,198,207,248,87,142,127,97,99,42,131) -IMAGE_DATA(136,42,234,133,153,82,101,155,176,215,37,89,242,119,230,163,249,183,250,184,83,85,240,178,163,196,64,122,95,101,222,61) -IMAGE_DATA(165,190,187,70,248,96,251,42,198,144,241,175,29,159,245,209,227,220,164,104,191,99,131,158,25,80,102,175,78,54,173,101) -IMAGE_DATA(28,175,49,137,111,37,97,198,63,63,62,195,138,241,5,22,224,130,34,242,7,126,154,4,137,0,0,0,0,0,0,0) -IMAGE_END_DATA(608, 16) - -IMAGE_BEGIN_DATA -IMAGE_DATA(120,156,237,150,137,13,195,48,8,69,25,33,35,103,52,111,70,213,86,74,28,204,241,125,201,74,90,34,164,28,188,143) -IMAGE_DATA(141,45,28,218,104,35,34,102,26,111,108,56,206,107,23,174,161,243,184,134,205,99,26,62,31,107,196,188,175,49,55,127) -IMAGE_DATA(207,252,123,234,95,179,254,125,251,239,247,172,178,25,212,22,51,143,103,46,23,211,221,140,34,62,122,142,52,172,251,112) -IMAGE_DATA(14,239,88,233,0,123,201,101,240,150,142,202,88,110,105,116,228,31,49,255,131,165,182,250,15,89,127,71,79,126,71,236) -IMAGE_DATA(217,205,100,226,159,193,104,107,237,238,95,102,223,79,199,117,174,156,116,164,33,180,243,62,27,107,172,230,87,215,239,212) -IMAGE_DATA(104,95,255,82,231,201,13,193,105,6,218,233,81,117,162,164,148,62,158,243,202,59,51,175,136,53,223,89,121,17,159,193) -IMAGE_DATA(119,142,255,95,191,181,245,43,198,145,243,64,222,219,218,11,170,178,33,106,0,0,0,0,0,0,0,0,0,0,0,0) -IMAGE_END_DATA(224, 4) diff --git a/archive/uppsrc/Docedit/Docedit.lay b/archive/uppsrc/Docedit/Docedit.lay deleted file mode 100644 index 5e1f14410..000000000 --- a/archive/uppsrc/Docedit/Docedit.lay +++ /dev/null @@ -1,48 +0,0 @@ -#ifdef LAYOUTFILE - -LAYOUT(QueryLayout, 372, 120) - ITEM(LabelBox, dv___0, LeftPosZ(8, 132).TopPosZ(4, 108).SetLabel("Status")) - ITEM(Switch, status, LeftPosZ(16, 117).TopPosZ(20, 85).SetLabel("Any except ignored\nUndocumented\nObsolete\nIgnored\nAny")) - ITEM(Label, dv___2, LeftPosZ(152, 48).TopPosZ(12, 13).SetLabel("Name")) - ITEM(WithDropChoice, name, LeftPosZ(204, 160).TopPosZ(8, 19)) - ITEM(Label, dv___4, LeftPosZ(152, 48).TopPosZ(36, 13).SetLabel("Contains")) - ITEM(WithDropChoice, text, LeftPosZ(204, 160).TopPosZ(32, 19)) - ITEM(Label, dv___6, LeftPosZ(152, 44).TopPosZ(59, 13).SetLabel("Header")) - ITEM(DropList, header, LeftPosZ(204, 160).TopPosZ(56, 19)) - ITEM(Button, ok, LeftPosZ(232, 64).TopPosZ(88, 24).SetLabel("OK")) - ITEM(Button, cancel, LeftPosZ(300, 64).TopPosZ(88, 24).SetLabel("Cancel")) - ITEM(Button, clear, LeftPosZ(152, 64).TopPosZ(88, 24).SetLabel("Clear")) -END_LAYOUT - -LAYOUT(LinkLayout, 632, 500) - ITEM(Label, dv___0, LeftPosZ(8, 28).TopPosZ(12, 13).SetLabel("Link")) - ITEM(WithDropChoice, link, LeftPosZ(44, 580).TopPosZ(8, 19)) - ITEM(DropList, nameing, LeftPosZ(8, 224).TopPosZ(36, 19)) - ITEM(ArrayCtrl, nesting, LeftPosZ(8, 224).TopPosZ(60, 400)) - ITEM(ArrayCtrl, item, LeftPosZ(240, 384).TopPosZ(36, 300)) - ITEM(ArrayCtrl, label, LeftPosZ(240, 384).TopPosZ(340, 120)) - ITEM(Button, ok, LeftPosZ(492, 64).TopPosZ(468, 24).SetLabel("OK")) - ITEM(Button, cancel, LeftPosZ(560, 64).TopPosZ(468, 24).SetLabel("Cancel")) -END_LAYOUT - -LAYOUT(ExternalLayout, 400, 108) - ITEM(Label, dv___0, LeftPosZ(4, 68).TopPosZ(8, 13).SetLabel("Namespace")) - ITEM(WithDropChoice, nameing, LeftPosZ(80, 76).TopPosZ(4, 19)) - ITEM(Label, dv___2, LeftPosZ(176, 43).TopPosZ(8, 13).SetLabel("Nesting")) - ITEM(WithDropChoice, nesting, LeftPosZ(224, 168).TopPosZ(4, 19)) - ITEM(Label, dv___4, LeftPosZ(4, 28).TopPosZ(31, 13).SetLabel("Item")) - ITEM(EditString, item, LeftPosZ(80, 312).TopPosZ(28, 19)) - ITEM(Label, dv___6, LeftPosZ(4, 72).TopPosZ(56, 13).SetLabel("Host package")) - ITEM(DropList, package, LeftPosZ(80, 100).TopPosZ(52, 19)) - ITEM(Button, ok, LeftPosZ(260, 64).TopPosZ(76, 24).SetLabel("OK")) - ITEM(Button, cancel, LeftPosZ(328, 64).TopPosZ(76, 24).SetLabel("Cancel")) -END_LAYOUT - -LAYOUT(TemplateLayout, 672, 568) - ITEM(Button, ok, LeftPosZ(532, 64).TopPosZ(536, 24).SetLabel("OK")) - ITEM(Button, cancel, LeftPosZ(600, 64).TopPosZ(536, 24).SetLabel("Cancel")) - ITEM(DocEdit, code, LeftPosZ(164, 500).TopPosZ(8, 160)) - ITEM(RichTextView, view, LeftPosZ(164, 500).TopPosZ(172, 352)) -END_LAYOUT - -#endif diff --git a/archive/uppsrc/Docedit/Docedit.upp b/archive/uppsrc/Docedit/Docedit.upp deleted file mode 100644 index 40b910b8e..000000000 --- a/archive/uppsrc/Docedit/Docedit.upp +++ /dev/null @@ -1,15 +0,0 @@ -uses - docpp, - RichEdit; - -file - Docedit.h, - Docbase.cpp, - Docdir.cpp, - DocItem.cpp, - DocLink.cpp, - Docedit.cpp, - Docedit.iml, - Info readonly separator, - Copying; - diff --git a/archive/uppsrc/Ole/Copying b/archive/uppsrc/Ole/Copying deleted file mode 100644 index 82aabaae4..000000000 --- a/archive/uppsrc/Ole/Copying +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 2021, The U++ Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted -provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other materials provided - with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/archive/uppsrc/Ole/Ctrl/Ctrl.upp b/archive/uppsrc/Ole/Ctrl/Ctrl.upp deleted file mode 100644 index c9310a621..000000000 --- a/archive/uppsrc/Ole/Ctrl/Ctrl.upp +++ /dev/null @@ -1,17 +0,0 @@ -description "Windows GUI OLE encapsulation\377"; - -uses - Ole, - CtrlCore; - -file - OleCtrl.h, - util.cpp, - control.cpp, - ocx.def; - -custom() "idl", - "midl /newtlb $(!/I) /h \"$(DIR)/$(TITLE)_idl.h\" /iid \"$(DIR)/$(TITLE" - ")_idl.cpp\" /tlb \"$(DIR)/$(TITLE).tlb\" \"$(PATH)\"\r\n", - "$(DIR)/$(TITLE)_idl.h\r\n$(DIR)/$(TITLE).tlb\r\n"; - diff --git a/archive/uppsrc/Ole/Ctrl/OleCtrl.h b/archive/uppsrc/Ole/Ctrl/OleCtrl.h deleted file mode 100644 index 452d66319..000000000 --- a/archive/uppsrc/Ole/Ctrl/OleCtrl.h +++ /dev/null @@ -1,829 +0,0 @@ -#ifndef _Ole_Ctrl_OleCtrl_h_ -#define _Ole_Ctrl_OleCtrl_h_ - -#include -#include - -namespace Upp { - -#define OCXLOG RLOG // redefine to RLOG if you want logs in retail versions - -#ifdef _DEBUG -#define LOG_SYSOCXS 1 // 1 = log system calls (DllCanUnloadNow, DllGetClassObject) -#define LOG_METHODS 1 // 1 = log method calls -#define LOG_CREATES 1 // 1 = log instance creations & destructions -#define LOG_QUERIES 2 // 1 = log failed QueryInterface's -// // 2 = log all QueryInterface's -// // 3 = dump interface map whenever Query fails -#define LOG_PERSIST 1 // 1 = log saves / loads -#define LOG_RESULTS 2 // 1 = log error results -// // 2 = log all results -#define LOG_ADDREFS 1 // 1 = log AddRef's / Releases -#define LOG_INVOKES 1 // 1 = log IDispatch::Invoke -#else -#define LOG_SYSOCXS 1 -#define LOG_METHODS 0 -#define LOG_CREATES 0 -#define LOG_QUERIES 0 -#define LOG_PERSIST 0 -#define LOG_RESULTS 0 -#define LOG_ADDREFS 0 -#define LOG_INVOKES 0 -#endif - -#if LOG_SYSOCXS >= 1 -#define LOGSYSOCX(x) OCXLOG(x) -#else -#define LOGSYSOCX(x) -#endif - -#if LOG_METHODS >= 1 -#define LOGMETHOD(x) OCXLOG(x) -#else -#define LOGMETHOD(x) -#endif - -#if LOG_CREATES >= 1 -#define LOGCREATE(x) OCXLOG(x) -#else -#define LOGCREATE(x) -#endif - -#if LOG_QUERIES >= 1 -#define LOGQUERY(x) OCXLOG(x) -#else -#define LOGQUERY(x) -#endif - -#if LOG_PERSIST >= 1 -#define LOGPERSIST(x) OCXLOG(x) -#else -#define LOGPERSIST(x) -#endif - -#if LOG_RESULTS >= 2 -#define LOGRESULT(x) LogResult((x)) -#elif LOG_RESULTS >= 1 -#define LOGRESULT(x) LogError((x)) -#else -#define LOGRESULT(x) (x) -#endif - -#if LOG_INVOKES >= 1 -#define LOGINVOKE(x) OCXLOG(x) -#else -#define LOGINVOKE(x) -#endif - -typedef void (*InitProc)(); -InitProc& LateInitProc(); -InitProc& LateExitProc(); - -void DoLateInit(); -void DoLateExit(); - -#define OCX_APP_MAIN \ -void _DllMainAppInit(); \ -\ -static void _DllMainLateExit() \ -{ \ - RLOGBLOCK("_DllMainLateExit"); \ - Ctrl::ExitWin32(); \ -} \ -\ -static void _DllMainLateInit() \ -{ \ - RLOGBLOCK("_DllMainLateInit"); \ - RLOG("Ctrl::InitWin32"); \ - Ctrl::InitWin32(AppGetHandle()); \ - RLOG("AppInitEnvironment"); \ - AppInitEnvironment__(); \ - RLOG("DllMainAppInit"); \ - _DllMainAppInit(); \ - LateExitProc() = &_DllMainLateExit; \ -} \ -\ -BOOL WINAPI DllMain(HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpReserved) \ -{ \ - if(fdwReason == DLL_PROCESS_ATTACH) { \ - AppSetHandle(hinstDll); \ - } \ - RLOG("DllMain(" << FormatIntHex(hinstDll) << ", reason = " << (int)fdwReason << ")"); \ - if(fdwReason == DLL_PROCESS_ATTACH) { \ - LateInitProc() = &_DllMainLateInit; \ - } \ - else if(fdwReason == DLL_PROCESS_DETACH) { \ - DoLateExit(); \ - } \ - RLOG("//DllMain(" << FormatIntHex(hinstDll) << ", reason = " << (int)fdwReason << ")"); \ - return true; \ -} \ -\ -void _DllMainAppInit() - -/* -_variant_t ValueToVariant(const Value& v); -Value DispatchToValue(IDispatch *disp); -Value UnknownToValue(IUnknown *unk); -void ReturnVariant(VARIANT *var, const Value& v); -HRESULT CheckReturnString(BSTR *bstr, const String& s); -Color PackColor(long rgb); -long UnpackColor(Color c); -HRESULT CheckReturnColor(long *ptr, Color c); -*/ - -#define std_method HRESULT STDMETHODCALLTYPE -#define void_method void STDMETHODCALLTYPE - -class OcxTypeInfo; - -typedef VectorMap InterfaceMap; - -inline void AddInterfaceRaw(InterfaceMap& map, const Guid& guid, IUnknown *iface) -{ - map.Add(guid, iface); -} - -template -inline void AddInterface(InterfaceMap& map, const Guid& guid, T *iface) -{ - AddInterfaceRaw(map, guid, iface); -} - -#define PARENT_INTERFACE(clss, base) \ -template <> \ -inline void AddInterface(InterfaceMap& map, const Guid& guid, clss *iface) \ -{ \ - AddInterfaceRaw(map, guid, iface); \ - AddInterface(map, __uuidof(base), iface); \ -} - -PARENT_INTERFACE(IProvideClassInfo2, IProvideClassInfo) -PARENT_INTERFACE(IViewObject2, IViewObject) -PARENT_INTERFACE(IViewObjectEx, IViewObject2) -PARENT_INTERFACE(IOleInPlaceObject, IOleWindow) -PARENT_INTERFACE(IOleInPlaceObjectWindowless, IOleInPlaceObject) -PARENT_INTERFACE(IOleInPlaceActiveObject, IOleWindow) -PARENT_INTERFACE(IPersistStorage, IPersist) -PARENT_INTERFACE(IPersistStream, IPersist) -PARENT_INTERFACE(IPersistFile, IPersist) -PARENT_INTERFACE(IClassFactory2, IClassFactory) - -class OcxObject -{ - friend class OcxTypeInfo; - -public: - OcxObject(); - - template - void AddInterface(const Guid& guid, T *iface) { UPP::AddInterface(interface_map, guid, iface); } - template - void AddInterface(T *iface) { UPP::AddInterface(interface_map, __uuidof(T), iface); } - - IUnknown *OuterUnknown() { return outer_unknown ? outer_unknown : &inner_unknown; } - IUnknown *InnerUnknown() { return &inner_unknown; } - - HRESULT InternalQueryInterface(const GUID& iid, void **ppv); - HRESULT ExternalQueryInterface(const GUID& iid, void **ppv); - - static HRESULT RawGetTypeInfo(IRef& dispatch_info, unsigned tinfo, LCID lcid, ITypeInfo **ppinfo); - static HRESULT RawGetIDsOfNames(IRef& dispatch_info, REFIID riid, OLECHAR **names, unsigned cnames, LCID lcid, DISPID *dispid); - static HRESULT RawInvoke(IRef& dispatch_info, IDispatch *disp, DISPID dispid, word flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep, unsigned *arg_err); - - static const char *GetObjectName() { return ""; } // programmatic object name (synthetic = .) - static const char *GetObjectHelp() { return ""; } // user-visible object name (synthetic = (CONTROL ? " Control " | " Object ") -// static GUID GetDispatchGUID() { return __uuidof(0); } // default ingoing dispatch interface - static GUID GetEventGUID() { return __uuidof(0); } // default outgoing dispatch interface - - enum - { - VERSION = 0, - CONTROL = 0, // override with 1 to make a control class - }; - - virtual int InternalAddRef() = 0; - virtual int InternalRelease() = 0; - - int ExternalAddRef(); - int ExternalRelease(); - -protected: - class OcxInnerUnknown : public IUnknown { - public: - OcxInnerUnknown() : owner(0) {} - ULONG STDMETHODCALLTYPE AddRef() { return owner->InternalAddRef(); } - ULONG STDMETHODCALLTYPE Release() { return owner->InternalRelease(); } - STDMETHOD(QueryInterface)(REFIID iid, void **ppv) { return owner->InternalQueryInterface(iid, ppv); } - - public: - OcxObject *owner; - }; - - OcxTypeInfo *ocx_info; - IUnknown *outer_unknown; - InterfaceMap interface_map; - OcxInnerUnknown inner_unknown; -}; - -template -class Interface : public I, virtual public OcxObject -{ -public: - Interface() { AddInterface(this); } -}; - -template -class DispatchInterface : public Interface -{ -public: - DispatchInterface() { AddInterface(__uuidof(I), this); AddInterface(this); } -// static GUID GetDispatchGUID() { return __uuidof(I); } - - // IDispatch - - STDMETHOD(GetTypeInfoCount)(unsigned *pctinfo); - STDMETHOD(GetTypeInfo)(unsigned tinfo, LCID lcid, ITypeInfo **ppinfo); - STDMETHOD(GetIDsOfNames)(REFIID riid, OLECHAR **names, unsigned cnames, LCID lcid, DISPID *dispid); - STDMETHOD(Invoke)(DISPID dispid, REFIID riid, LCID lcid, word flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep, unsigned *arg_err); - -protected: - void LoadTypeInfo() { ocx_info->GetDispatchTypeInfo(dispatch_info, __uuidof(I)); } - -protected: - IRef dispatch_info; -}; - -template -STDMETHODIMP DispatchInterface::GetTypeInfoCount(unsigned *pctinfo) -{ - if(!pctinfo) return E_POINTER; - *pctinfo = 1; - return S_OK; -} - -template -STDMETHODIMP DispatchInterface::GetTypeInfo(unsigned tinfo, LCID lcid, ITypeInfo **ppinfo) -{ - if(!ppinfo) return E_POINTER; - LoadTypeInfo(); - if(*ppinfo = ~dispatch_info) dispatch_info->AddRef(); - return S_OK; -} - -template -STDMETHODIMP DispatchInterface::GetIDsOfNames(REFIID riid, OLECHAR **names, unsigned cnames, LCID lcid, DISPID *dispid) -{ - LoadTypeInfo(); - return RawGetIDsOfNames(dispatch_info, riid, names, cnames, lcid, dispid); -} - -template -STDMETHODIMP DispatchInterface::Invoke(DISPID dispid, REFIID riid, LCID lcid, word flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep, unsigned *arg_err) -{ - LoadTypeInfo(); - return RawInvoke(dispatch_info, static_cast(this), dispid, flags, params, result, excep, arg_err); -} - -class OcxProvideClassInfo : public Interface -{ -public: - // IProvideClassInfo - - STDMETHOD(GetClassInfo)(ITypeInfo **info); - - // IProvideClassInfo2 - - STDMETHOD(GetGUID)(dword guidkind, GUID *guid); -}; - -template -class OcxObjectWrapper : public T -{ -public: - OcxObjectWrapper() : refcount(0) {} - OcxObjectWrapper(OcxTypeInfo& _ocx_info) : refcount(0) { ocx_info = &_ocx_info; _ocx_info.object_count++; } - - static OcxObject *New() { return new OcxObjectWrapper(); } - static OcxObject *New(OcxTypeInfo& _ocx_info) { return new OcxObjectWrapper(_ocx_info); } - - virtual ULONG STDMETHODCALLTYPE AddRef() { return ExternalAddRef(); } - virtual ULONG STDMETHODCALLTYPE Release() { return ExternalRelease(); } - STDMETHOD(QueryInterface)(REFIID iid, void **ppv) { return ExternalQueryInterface(iid, ppv); } - - static String GetName(); - - virtual int InternalAddRef(); - virtual int InternalRelease(); - -private: - void Destroy(); - -private: - ULONG refcount; -}; - -template -int OcxObjectWrapper::InternalAddRef() -{ - ++refcount; -#if LOG_ADDREFS - RLOG(GetTypeName(typeid(*this)) << "::InternalAddRef(" << refcount << ")"); -#endif - return refcount; -} - -template -int OcxObjectWrapper::InternalRelease() -{ - int u = --refcount; -#if LOG_ADDREFS - RLOG(GetTypeName(typeid(*this)) << "::InternalRelease(" << refcount << ")"); -#endif - if(!u) - Destroy(); - return u; -} - -template -String OcxObjectWrapper::GetName() -{ - if(*T::GetObjectName()) - return T::GetObjectName(); - return GetTypeName(typeid(T)); -} - -template -void OcxObjectWrapper::Destroy() -{ - if(ocx_info) - { - ocx_info->object_count--; - LOGCREATE("\tdelete " << GetTypeName(typeid(T)) << ": " - << (int)ocx_info->object_count << " instances left in system"); - } - else - LOGCREATE("\tdelete " << GetTypeName(typeid(T))); - delete this; -} - -class OcxTypeInfo : public Interface -{ - friend class OcxTypeLib; - -public: - typedef OcxObject *(*New)(OcxTypeInfo& entry); - - OcxTypeInfo(const GUID& coclass_guid, /*const GUID& dispatch_guid,*/ const GUID& event_guid, - New new_fn, String name, const char* help = "", int ver = 0, - bool is_control = false); - - bool IsControl() const { return is_control; } - bool CanUnload() const; - - const Guid& GetCoClassGUID() const { return coclass_guid; } -// const Guid& GetDispatchGUID() const { return dispatch_guid; } - const Guid& GetEventGUID() const { return event_guid; } - - String GetName() const { return name; } - -// IRef GetDispatchTypeInfo(); - void GetDispatchTypeInfo(IRef& dest, Guid dispatch_iid); - IRef GetCoClassTypeInfo(); - - // IUnknown - - virtual int InternalAddRef() { return IncRef(); } - virtual int InternalRelease() { return DecRef(); } - virtual ULONG STDMETHODCALLTYPE AddRef() { return IncRef(); } - virtual ULONG STDMETHODCALLTYPE Release() { return DecRef(); } - STDMETHOD(QueryInterface)(REFIID iid, void **ppv) { return ExternalQueryInterface(iid, ppv); } - - // IClassFactory - - STDMETHOD(CreateInstance)(IUnknown *outer, REFIID iid, void **object); - STDMETHOD(LockServer)(BOOL lock); - - STDMETHOD(GetLicInfo)(/* [out] */ LICINFO *pLicInfo); - STDMETHOD(RequestLicKey)(/* [in] */ DWORD dwReserved, /* [out] */ BSTR *pBstrKey); - - STDMETHOD(CreateInstanceLic)( - /* [in] */ IUnknown *pUnkOuter, - /* [in] */ IUnknown *pUnkReserved, - /* [in] */ REFIID riid, - /* [in] */ BSTR bstrKey, - /* [iid_is][out] */ PVOID *ppvObj); - -public: - long object_count; // managed object count - IRef coclass_info; // coclass type info -// IRef dispatch_info; // ingoing dispatch interface type info - CriticalSection critical; // critical section used for initializations - -private: - int IncRef(); - int DecRef(); - -private: - Guid coclass_guid; // coclass GUID - Guid dispatch_guid; // GUID of default ingoing dispatch interface - Guid event_guid; // GUID of default outgoing dispatch interface - New new_fn; // constructor - String name; // programmatic object name - .. by default - const char *help; // user-visible object name - (" Control " | " Object ") by default - int ver; // 0 = use main library version - bool is_control; // false = generic object, true = insertable control - - long refcount; // AddRef/Release counter - Atomic lock_count; // LockServer lock count - -#ifndef _USRDLL - dword registration; // for CoRevokeClassObject -#endif -}; - -class OcxTypeLib -{ -public: - static OcxTypeLib& Get(); - - OcxTypeLib& Name(String name) { lib_name = name; return *this; } - String GetName() const { return lib_name; } - OcxTypeLib& DisplayName(String dn) { display_name = dn; return *this; } - String GetDisplayName() const { return display_name; } - String GetLibName() const; - OcxTypeLib& UsesLibrary(String name) { uses_libraries.GetAdd(name); return *this; } - - OcxTypeLib& Version(int _ver) { lib_ver = _ver; return *this; } - int GetVersion() const { return lib_ver; } - - HRESULT Register(); - HRESULT Unregister(); - HRESULT GetFactory(REFCLSID clsid, REFIID iid, void **ppv); - bool CanUnload() const; -#ifndef _USRDLL - HRESULT RegisterObjects(); // call CoRegisterClassObject for each object - void RevokeObjects(); // call CoRevokeClassObject -#endif - - void Add(OcxTypeInfo& entry) { objects.FindAdd(entry.coclass_guid, &entry); } - void AddInit(void (*fn)()) { ocx_init.Add(fn); } - - IRef GetTypeInfo(const Guid& guid); - - IRef& GetTypeLib(); - IRef& operator -> () { return GetTypeLib(); } - -public: - IRef typelib; - CriticalSection critical; - -private: - OcxTypeLib(); - -private: - VectorMap objects; - Vector ocx_init; - String lib_name; - String display_name; - int lib_ver; - VectorMap > uses_libraries; -}; - -struct OcxInit { OcxInit(void (*fn)()) { OcxTypeLib::Get().AddInit(fn); } }; -#define OCX_INIT(fn) static OcxInit MK__s = fn; - -#define OCX_OBJECT(type) \ - static OcxTypeInfo MK__s( \ - __uuidof(type), /* coclass GUID */ \ - /*type::GetDispatchGUID(),*/ /* default ingoing dispatch interface GUID */ \ - type::GetEventGUID(), /* default outgoing dispatch interface GUID */ \ - OcxObjectWrapper::New, /* constructor */ \ - OcxObjectWrapper::GetName(), /* name */ \ - type::GetObjectHelp(), /* help */ \ - type::VERSION, /* version */ \ - type::CONTROL); /* control object */ - -#define OCX_NEWOBJECT(type) \ - OCX_OBJECT(type) \ - static IRef COMBINE(OcxNew_, type)() { return new OcxObjectWrapper(MK__s); } - -#ifndef _USRDLL -bool ExeRegisterServer(); -bool ExeUnregisterServer(); -void ExeRunServer(); -#endif - -Size ToHiMetric(Size pixel_size); -Size FromHiMetric(Size himetric_size); -Rect GetWindow(HDC hdc); -Rect GetViewport(HDC hdc); - -LPOLESTR AllocString(String s); - -template -class SinkMap : public VectorMap -{ -public: - typedef VectorMap Base; - SinkMap() : next_sink_id(0) {} - dword Add(const T& object) { Base::Add(++next_sink_id, object); return next_sink_id; } - bool Remove(dword id) { int i = Find(id); return (i >= 0 ? (Base::Remove(i), true) : false); } - -private: - dword next_sink_id; -}; - -//template OleType; - -class OcxControl : public Ctrl, - public Interface, - public Interface, - public Interface, - public Interface, - public Interface, - public Interface, - public Interface, - public Interface, - public Interface, - public OcxProvideClassInfo -{ -public: - OcxControl(); - virtual ~OcxControl(); - - virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); - bool Open(HWND parent); - virtual void Serialize(Stream& stream); - void SerializePos(Stream& stream); - - virtual bool IsOcxChild(); - - using Ctrl::GetRect; - using Ctrl::SetData; - using Ctrl::GetData; - - // IOleObject - - STDMETHOD(SetClientSite)(IOleClientSite *site); - STDMETHOD(GetClientSite)(IOleClientSite **res); - STDMETHOD(SetHostNames)(LPCOLESTR app_name, LPCOLESTR doc_name); - STDMETHOD(Close)(dword save_option); - STDMETHOD(SetMoniker)(dword which, IMoniker *moniker); - STDMETHOD(GetMoniker)(dword assign, dword which, IMoniker **moniker); - STDMETHOD(InitFromData)(IDataObject *data, BOOL creation, dword); - STDMETHOD(GetClipboardData)(dword, IDataObject **data); - STDMETHOD(DoVerb)(long verb, MSG *msg, IOleClientSite *active_site, long index, HWND hwnd, const RECT *rc); - STDMETHOD(EnumVerbs)(IEnumOLEVERB **verbs); - STDMETHOD(Update)(); - STDMETHOD(IsUpToDate)(); - STDMETHOD(GetUserClassID)(GUID *guid); - STDMETHOD(GetUserType)(dword form, LPOLESTR *type); - STDMETHOD(SetExtent)(dword aspect, SIZEL *size); - STDMETHOD(GetExtent)(dword aspect, SIZEL *size); - STDMETHOD(Advise)(IAdviseSink *sink, dword *connection); - STDMETHOD(Unadvise)(dword connection); - STDMETHOD(EnumAdvise)(IEnumSTATDATA **sink_enum); - STDMETHOD(GetMiscStatus)(dword aspect, dword *status); - STDMETHOD(SetColorScheme)(LOGPALETTE *logpal); - - // IPersistStorage - - STDMETHOD(GetClassID)(GUID *guid); - STDMETHOD(IsDirty)(); // IPersistStreamInit as well - STDMETHOD(InitNew)(IStorage *stg); - STDMETHOD(Load)(IStorage *stg); - STDMETHOD(Save)(IStorage *stg, BOOL same_as_load); - STDMETHOD(SaveCompleted)(IStorage *stg); - STDMETHOD(HandsOffStorage)(); - - // IPersistStreamInit - - STDMETHOD(Load)(IStream *stream); - STDMETHOD(Save)(IStream *stream, BOOL clear_dirty); - STDMETHOD(GetSizeMax)(ULARGE_INTEGER *size); - STDMETHOD(InitNew)(); - - // IDataObject - - STDMETHOD(GetData)(FORMATETC *format, STGMEDIUM *medium); - STDMETHOD(GetDataHere)(FORMATETC *format, STGMEDIUM *medium); - STDMETHOD(QueryGetData)(FORMATETC *format); - STDMETHOD(GetCanonicalFormatEtc)(FORMATETC *in, FORMATETC *out); - STDMETHOD(SetData)(FORMATETC *format, STGMEDIUM *medium, BOOL free); - STDMETHOD(EnumFormatEtc)(dword dir, IEnumFORMATETC **enumerator); - STDMETHOD(DAdvise)(FORMATETC *format, dword advf, IAdviseSink *sink, dword *connection); - STDMETHOD(DUnadvise)(dword connection); - STDMETHOD(EnumDAdvise)(IEnumSTATDATA **enumerator); - - // IViewObject - - STDMETHOD(Draw)(DWORD aspect, LONG index, void *aspectinfo, - DVTARGETDEVICE *device, HDC target, HDC draw, - const RECTL *bounds, const RECTL *wbounds, - BOOL (STDMETHODCALLTYPE *progress)(ULONG_PTR dwContinue), ULONG_PTR arg); - STDMETHOD(GetColorSet)(dword aspect, long index, void *aspectinfo, - DVTARGETDEVICE *device, HDC target, LOGPALETTE **palette); - STDMETHOD(Freeze)(dword aspect, long index, void *aspectinfo, - dword *freeze_key); - STDMETHOD(Unfreeze)(dword freeze_key); - STDMETHOD(SetAdvise)(dword aspect, dword advf, IAdviseSink *sink); - STDMETHOD(GetAdvise)(dword *aspect, dword *advf, IAdviseSink **sink); - - // IViewObject2 - - STDMETHOD(GetExtent)(dword aspect, long index, DVTARGETDEVICE *device, SIZEL *size); - - // IViewObjectEx - - STDMETHOD(GetRect)(dword aspect, RECTL *rc); - STDMETHOD(GetViewStatus)(dword *status); - STDMETHOD(QueryHitPoint)(dword aspect, const RECT *bounds, POINT pos, long close_hint, dword *result); - STDMETHOD(QueryHitRect)(dword aspect, const RECT *bounds, const RECT *, long close_hint, dword *result); - STDMETHOD(GetNaturalExtent)(dword aspect, long index, DVTARGETDEVICE *ptd, HDC tdc, DVEXTENTINFO *extinfo, SIZEL *psize); - - // IOleWindow - - STDMETHOD(GetWindow)(HWND *hwnd); - STDMETHOD(ContextSensitiveHelp)(BOOL enter_mode); - - // IOleInPlaceObject - - STDMETHOD(InPlaceDeactivate)(); - STDMETHOD(UIDeactivate)(); - STDMETHOD(SetObjectRects)(const RECT *pos, const RECT *clip); - STDMETHOD(ReactivateAndUndo)(); - - // IOleInPlaceActiveObject - - STDMETHOD(TranslateAccelerator)(MSG *msg); - STDMETHOD(OnFrameWindowActivate)(BOOL activate); - STDMETHOD(OnDocWindowActivate)(BOOL activate); - STDMETHOD(ResizeBorder)(const RECT *border, IOleInPlaceUIWindow *ui, BOOL frame); - STDMETHOD(EnableModeless)(BOOL enable); - - // IOleControl - - STDMETHOD(GetControlInfo)(CONTROLINFO *cinfo); - STDMETHOD(OnMnemonic)(MSG *msg); - STDMETHOD(OnAmbientPropertyChange)(DISPID dispid); - STDMETHOD(FreezeEvents)(BOOL freeze); - - // IPointerInactive - - STDMETHOD(GetActivationPolicy)(DWORD *pdwPolicy); - STDMETHOD(OnInactiveMouseMove)(LPCRECT pRectBounds, LONG x, LONG y, DWORD grfKeyState); - STDMETHOD(OnInactiveSetCursor)(LPCRECT pRectBounds, LONG x, LONG y, DWORD dwMouseMsg, BOOL fSetAlways); - - // default verb - - virtual HRESULT DoVerbPrimary(); - virtual HRESULT DoVerbShow(); - virtual HRESULT DoVerbInPlaceActivate(); - virtual HRESULT DoVerbUIActivate(); - virtual HRESULT DoVerbOpen(); - virtual HRESULT DoVerbHide(); - virtual HRESULT DoVerbDiscardUndo(); - virtual HRESULT DoVerbProperties(); - - // various helpers - - bool IsClosed() const { return status == CLOSED; } -// bool IsForged() const { return status == FORGED; } - bool IsActive() const { return status >= ACTIVE; } - bool IsUIActive() const { return status == UIACTIVE; } - - void RefreshSink(); - - enum { CONTROL = 1 }; - -protected: - void UpdateControlRect(); - HRESULT ShowControl(bool ui_activate); - void SetActiveObject(bool set); - - void TimerThread(); - -protected: - static const WCHAR data_stream_name[]; // default data stream - - enum STATE { CLOSED, /* FORGED, */ ACTIVE, UIACTIVE }; - -// Thread timer_thread; - IRef client_site; - IRef in_place_site; - SinkMap< IRef > advise_sinks; - dword view_sink_aspect; - dword view_sink_advf; - IRef view_sink; - Rect ctrl_rect; - Size extent_size; - STATE status; -// WPARAM ncmm_wParam; -// LPARAM ncmm_lParam; - bool stream_inited; - bool timer_shutdown; -}; - -class OcxRunnableControl : public OcxControl, public Interface -{ -public: - OcxRunnableControl() {} - - // IRunnableObject - - STDMETHOD(GetRunningClass)(GUID *clsid); - STDMETHOD(Run)(LPBC ctx); - BOOL STDMETHODCALLTYPE IsRunning(); - STDMETHOD(LockRunning)(BOOL lock, BOOL last_unlock_closes); - STDMETHOD(SetContainedObject)(BOOL contained); -}; - -/* -struct CtrlHook : public Ctrl -{ -public: - void _CreateChild() { Ctrl::CreateChild(); } -}; -*/ - -class OcxConnectionPoint : public Interface -{ -public: - OcxConnectionPoint() {} - - void SetEventGUID(const Guid& g) { guid = g; } - void SetContainer(IConnectionPointContainer *cont) { container = cont; } - void FireEvent(int method_id, const Vector& values); - - STDMETHOD(GetConnectionInterface)(IID *iid); - STDMETHOD(GetConnectionPointContainer)(IConnectionPointContainer **ppCPC); - STDMETHOD(Advise)(IUnknown *ptr, DWORD *cookie); - STDMETHOD(Unadvise)(DWORD cookie); - STDMETHOD(EnumConnections)(IEnumConnections **enum_conn); - - class Enumerator : public Interface - { - public: - Enumerator() {} - - void Attach(OcxConnectionPoint *pt) { point = IRef(pt); index = 0; } - - STDMETHOD(Next)(unsigned long count, CONNECTDATA *data, unsigned long *fetched); - STDMETHOD(Skip)(unsigned long connections); - STDMETHOD(Reset)(); - STDMETHOD(Clone)(IEnumConnections **enum_conn); - - private: - IRef point; - int index; - }; - - friend class Enumerator; - -public: - Guid guid; - -protected: - IConnectionPointContainer *container; - VectorMap > conn_map; - Vector free_id; -}; - -class OcxConnectionPointContainer : public Interface -{ -public: - OcxConnectionPointContainer(); - - void AddConnectionPoint(OcxConnectionPoint *conn) { point_map.GetAdd(conn -> guid) = conn; conn -> SetContainer(this); } - - STDMETHOD(EnumConnectionPoints)(IEnumConnectionPoints **ppEnum); - STDMETHOD(FindConnectionPoint)(REFIID riid, IConnectionPoint **ppCP); - -private: - class Enumerator : public Interface - { - public: - Enumerator() {} - - void Attach(OcxConnectionPointContainer *pt) { point = pt; index = 0; } - - STDMETHOD(Next)(unsigned long count, IConnectionPoint **rgpcn, unsigned long *fetched); - STDMETHOD(Skip)(unsigned long connections); - STDMETHOD(Reset)(); - STDMETHOD(Clone)(IEnumConnectionPoints **enum_conn); - - private: - IRef point; - int index; - }; - - friend class Enumerator; - -private: - VectorMap point_map; -}; - -} - -#endif diff --git a/archive/uppsrc/Ole/Ctrl/control.cpp b/archive/uppsrc/Ole/Ctrl/control.cpp deleted file mode 100644 index 6430b2c41..000000000 --- a/archive/uppsrc/Ole/Ctrl/control.cpp +++ /dev/null @@ -1,1209 +0,0 @@ -#include - -#ifdef PLATFORM_WIN32 - -namespace Upp { - -LPOLESTR AllocString(String s) -{ - LPOLESTR p = reinterpret_cast(CoTaskMemAlloc(sizeof(OLECHAR) * (s.GetLength() + 1))), d = p; - const char *f = s; - while(*d++ = *f++) - ; - return p; -} - -OcxControl::OcxControl() -{ - ActiveX(); - view_sink_aspect = DVASPECT_CONTENT; - view_sink_advf = 0; - status = CLOSED; - stream_inited = false; - timer_shutdown = false; - extent_size = GetStdSize(); -} - -OcxControl::~OcxControl() -{ - LOGMETHOD("OcxControl::~OcxControl"); -} - -bool OcxControl::IsOcxChild() -{ - return true; -} - -LRESULT OcxControl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) -{ - LOGMETHOD("OcxControl::WindowProc"); -// RLOG("message = " << FormatIntHex(message) << ", wParam = " << FormatIntHex(wParam) << ", lParam = " << FormatIntHex(lParam)); - if(message == WM_GETDLGCODE) - return DLGC_WANTALLKEYS | DLGC_WANTARROWS | DLGC_WANTMESSAGE; - LRESULT res = Ctrl::WindowProc(message, wParam, lParam); - return res; -} - -bool OcxControl::Open(HWND parent) // parent = 0 - create forged control -{ - LOGMETHOD("OcxControl::Open"); -// if(!IsForged()) - ctrl_rect = GetRect(); - if(IsOpen()) - Ctrl::Close(); - if(parent && IsChild()) - Remove(); - status = CLOSED; - -// noproc = true; -// visible |= !parent; - Rect rc = ctrl_rect; - if(IsNull(rc)) - rc = Rect(0, 0, 0, 0); - if(!parent) - { // move window away from screen in forged mode - rc.Offset(-30000 - rc.left, -30000 - rc.top); - SetRect(rc); - } -// view.SetRectEmpty(); - - Create(parent, (IsEnabled() ? 0 : WS_DISABLED) | (parent ? WS_CHILD : WS_POPUP) | WS_VISIBLE, - (parent ? 0 : WS_EX_TOOLWINDOW), false, SW_HIDE, false); - - Show(); - -/* wnd = &stdwnd; - fullrefresh = false; - dword style = parent ? WS_CHILD : WS_POPUP, exstyle = WS_EX_TOOLWINDOW; - if(!enabled) style |= WS_DISABLED; - noproc = true; - visible |= !parent; - Rect rc = GetRect(); - if(!parent) - { // move window away from screen in forged mode - rc.OffsetRect(-30000 - rc.left, -30000 - rc.top); - SetRect(rc); - } - view.SetRectEmpty(); - wnd->CreateEx(exstyle, CtrlWindowClass(), -#ifdef _DEBUG - Name(), -#else - NULL, -#endif - style, - rc.left, rc.top, rc.Width(), rc.Height(), - parent ? parent : 0, 0, 0); - - if(!wnd->m_hWnd) - return false; - - type = POPUP; - noproc = false; - - for(Ctrl *q = GetFirstChild(); q; q = q->GetNext()) - reinterpret_cast(q)->_CreateChild(); - - if(visible) - ShowWindow(GetHWND(), SW_SHOWNA); -// SetMnemonic((byte) hotchar); - - RefreshLayout(); - RefreshPos(); - Refresh(); - CancelMode(); - CreateInit(); - move = true; -*/ - status = ACTIVE; //(parent ? ACTIVE : FORGED); - return true; -} - -void OcxControl::Serialize(Stream& stream) -{ - int version = 1; - SerializePos(stream); -} - -void OcxControl::SerializePos(Stream& stream) -{ - int version = 1; - stream / version; - Rect rc; - if(stream.IsStoring()) - rc = GetRect(); - stream % rc; - if(stream.IsLoading()) - SetRect(rc); -} - -const WCHAR OcxControl::data_stream_name[] = L"data"; - -HRESULT OcxControl::SetClientSite(IOleClientSite *site) -{ - LOGMETHOD("IOleObject::SetClientSite()"); - in_place_site = site; - client_site = site; - if(GetRect().IsEmpty()) { - LOG("Setting up default control rect..."); - SetRect(GetStdSize()); - } - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::GetClientSite(IOleClientSite **res) -{ - LOGMETHOD("IOleObject::GetClientSite"); - if(*res = ~client_site) - client_site->AddRef(); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::SetHostNames(LPCOLESTR app_name, LPCOLESTR doc_name) -{ - LOGMETHOD("IOleObject::SetHostNames"); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::Close(dword save_option) -{ - LOGMETHOD("IOleObject::Close"); - InPlaceDeactivate(); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::SetMoniker(dword which, IMoniker *moniker) -{ - LOGMETHOD("IOleObject::SetMoniker"); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::GetMoniker(dword assign, dword which, IMoniker **moniker) -{ - LOGMETHOD("IOleObject::GetMoniker"); - *moniker = 0; - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::InitFromData(IDataObject *data, BOOL creation, dword) -{ - LOGMETHOD("IOleObject::InitFromData"); - return LOGRESULT(S_FALSE); -} - -HRESULT OcxControl::GetClipboardData(dword, IDataObject **data) -{ - LOGMETHOD("IOleObject::GetClipboardData"); - *data = 0; - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::DoVerb(long verb, MSG *msg, IOleClientSite *active_site, - long index, HWND parent, const RECT *rc) -{ - LOGMETHOD("IOleObject::DoVerb"); - switch(verb) - { - case OLEIVERB_PRIMARY: return DoVerbPrimary(); - case OLEIVERB_SHOW: return DoVerbShow(); - case OLEIVERB_INPLACEACTIVATE: return DoVerbInPlaceActivate(); - case OLEIVERB_UIACTIVATE: return DoVerbUIActivate(); - case OLEIVERB_HIDE: return DoVerbHide(); - case OLEIVERB_OPEN: return DoVerbOpen(); - case OLEIVERB_DISCARDUNDOSTATE: return DoVerbDiscardUndo(); - case OLEIVERB_PROPERTIES: return DoVerbProperties(); - default: return OLEOBJ_S_INVALIDVERB; - } -} - -HRESULT OcxControl::EnumVerbs(IEnumOLEVERB **verbs) -{ - LOGMETHOD("IOleObject::EnumVerbs"); - *verbs = 0; - return LOGRESULT(OLEOBJ_E_NOVERBS); -} - -HRESULT OcxControl::Update() -{ - LOGMETHOD("IOleObject::Update"); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::IsUpToDate() -{ - LOGMETHOD("IOleObject::IsUpToDate"); - return LOGRESULT(MK_E_UNAVAILABLE); -} - -HRESULT OcxControl::GetUserClassID(GUID *guid) -{ - LOGMETHOD("IOleObject::GetUserClassID"); - ASSERT(ocx_info); - *guid = ocx_info->GetCoClassGUID(); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::GetUserType(dword form, LPOLESTR *type) -{ -// __asm int 3 - LOGMETHOD("IOleObject::GetUserType"); - ASSERT(ocx_info); - *type = AllocString(ocx_info->GetName()); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::SetExtent(dword aspect, SIZEL *hi_size) -{ - LOGMETHOD("IOleObject::SetExtent(" << hi_size->cx << ", " << hi_size->cy << ")"); - if(aspect == DVASPECT_CONTENT) { - extent_size = min(FromHiMetric(*hi_size), GetMaxSize()); - OCXLOG("Ctrl size = " << extent_size); - SetRect(Rect(GetRect().TopLeft(), extent_size)); - } - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::GetExtent(dword aspect, SIZEL *size) -{ - LOGMETHOD("IOleObject::GetExtent"); - if(aspect == DVASPECT_CONTENT) { - *size = ToHiMetric(extent_size); - return LOGRESULT(S_OK); - } - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::Advise(IAdviseSink *sink, dword *connection) -{ - LOGMETHOD("IOleObject::Advise"); - if(!sink || !connection) - return E_INVALIDARG; - *connection = advise_sinks.Add(sink); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::Unadvise(dword connection) -{ - LOGMETHOD("IOleObject::Unadvise"); - return LOGRESULT(advise_sinks.Remove(connection) ? S_OK : E_INVALIDARG); -} - -HRESULT OcxControl::EnumAdvise(IEnumSTATDATA **sink_enum) -{ - LOGMETHOD("IOleObject::EnumAdvise"); - *sink_enum = 0; - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::GetMiscStatus(dword aspect, dword *st) -{ - LOGMETHOD("IOleObject::GetMiscStatus"); - *st = OLEMISC_RECOMPOSEONRESIZE - | OLEMISC_INSIDEOUT - | OLEMISC_ACTIVATEWHENVISIBLE; - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::SetColorScheme(LOGPALETTE *logpal) -{ - LOGMETHOD("IOleObject::SetColorScheme"); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::GetClassID(GUID *guid) -{ - LOGMETHOD("IPersist::GetClassID"); - ASSERT(ocx_info); - *guid = ocx_info->GetCoClassGUID(); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::IsDirty() -{ - LOGMETHOD("IPersistStorage::IsDirty"); - return LOGRESULT(IsModified() ? S_OK : S_FALSE); -} - -HRESULT OcxControl::InitNew(IStorage *stg) -{ - LOGMETHOD("IPersistStorage::InitNew"); - if(!stg) - return LOGRESULT(E_INVALIDARG); - HRESULT hr; - IStreamPtr stream; - if(FAILED(hr = stg->CreateStream(data_stream_name, - STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stream))) - return LOGRESULT(hr); - return InitNew(); // call IPersistStream::InitNew -} - -HRESULT OcxControl::Load(IStorage *stg) -{ - LOGMETHOD("IPersistStorage::Load"); - if(!stg) - return LOGRESULT(E_INVALIDARG); - HRESULT hr; - IStreamPtr stream; - if(FAILED(hr = stg->OpenStream(data_stream_name, 0, - STGM_DIRECT | STGM_SHARE_EXCLUSIVE, 0, &stream))) - return LOGRESULT(hr); - return Load(stream); // delegate load to IPersistStream::Load -} - -HRESULT OcxControl::Save(IStorage *stg, BOOL same_as_load) -{ - LOGMETHOD("IPersistStorage::Save(" << (same_as_load ? "same as load" : "full save") << ')'); - if(!stg) - return LOGRESULT(E_INVALIDARG); - HRESULT hr; -#if LOG_PERSIST >= 1 - STATSTG stat; - Zero(stat); - if(FAILED(hr = stg->Stat(&stat, STATFLAG_NONAME))) - return LOGRESULT(hr); - OCXLOG(NFormat("Storage flags = %08x\r\n", (int)stat.grfMode)); - OCXLOG("CLSID = " << GetCoClassName(stat.clsid) << " - " << Format(stat.clsid)); -#endif - IStreamPtr stream; - if(FAILED(hr = stg->CreateStream(data_stream_name, - STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stream))) - return LOGRESULT(hr); - - if(FAILED(hr = Save(stream, true))) - return hr; - -#if LOG_PERSIST >= 1 - ULARGE_INTEGER ul; - if(FAILED(hr = stream->Seek(AsLarge(0), STREAM_SEEK_END, &ul))) - return hr; - OCXLOG("- stream size = " << ul.LowPart); -#endif - - return S_OK; -} - -HRESULT OcxControl::SaveCompleted(IStorage *stg) -{ - LOGMETHOD("IPersistStorage::SaveCompleted"); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::HandsOffStorage() -{ - LOGMETHOD("IPersistStorage::HandsOffStorage"); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::Load(IStream *stream) -{ - LOGMETHOD("IPersistStreamInit::Load"); - if(stream_inited) - return LOGRESULT(E_UNEXPECTED); -#if LOG_PERSIST >= 1 - ULARGE_INTEGER old_pos, len; - HRESULT hr; - if(FAILED(hr = stream->Seek(AsLarge(0), STREAM_SEEK_CUR, &old_pos)) - || FAILED(hr = stream->Seek(AsLarge(0), STREAM_SEEK_END, &len)) - || FAILED(hr = stream->Seek(reinterpret_cast(old_pos), STREAM_SEEK_SET, 0))) - return hr; - OCXLOG("- stream size = " << len.LowPart); -#endif - OleStream os(stream); - if(!os.IsOpen() || os.IsError()) - { - LOGPERSIST("- internal error creating OleStream"); - return LOGRESULT(E_FAIL); - } - os.SetLoading(); - Serialize(os); - ClearModify(); - os.Close(); - stream_inited = true; - if(os.IsError()) - return LOGRESULT(os.GetError() >= 0 ? os.GetError() : E_FAIL); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::Save(IStream *stream, BOOL clear_dirty) -{ - LOGMETHOD("IPersistStreamInit::Save"); - OleStream os(stream); - if(!os.IsOpen() || os.IsError()) - { - LOGPERSIST("- internal error creating OleStream"); - return LOGRESULT(E_FAIL); - } - os.SetStoring(); - Serialize(os); - os.Close(); - if(os.IsError()) - return LOGRESULT(os.GetError() >= 0 ? os.GetError() : E_FAIL); - if(clear_dirty) - ClearModify(); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::GetSizeMax(ULARGE_INTEGER *size) -{ - LOGMETHOD("IPersistStreamInit::GetSizeMax"); - if(!size) - return LOGRESULT(E_INVALIDARG); - SizeStream ss; - Serialize(ss); - *size = AsULarge(ss.GetSize()); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::InitNew() -{ - LOGMETHOD("IPersistStreamInit::InitNew"); - if(stream_inited) - return LOGRESULT(E_UNEXPECTED); - SetRect(Rect(Point(0, 0), GetStdSize())); - SetData(Value()); // default clear algorithm - ClearModify(); - stream_inited = true; - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::GetData(FORMATETC *format, STGMEDIUM *medium) -{ - LOGMETHOD("IDataObject::GetData"); - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::GetDataHere(FORMATETC *format, STGMEDIUM *medium) -{ - LOGMETHOD("IDataObject::GetDataHere"); - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::QueryGetData(FORMATETC *format) -{ - LOGMETHOD("IDataObject::QueryGetData"); - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::GetCanonicalFormatEtc(FORMATETC *in, FORMATETC *out) -{ - LOGMETHOD("IDataObject::GetCanonicalFormatEtc"); - *out = *in; - out->ptd = 0; - return LOGRESULT(DATA_S_SAMEFORMATETC); -} - -HRESULT OcxControl::SetData(FORMATETC *format, STGMEDIUM *medium, BOOL free) -{ - LOGMETHOD("IDataObject::SetData"); - if(free) - ReleaseStgMedium(medium); - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::EnumFormatEtc(dword dir, IEnumFORMATETC **enumerator) -{ - LOGMETHOD("IDataObject::EnumFormatEtc"); - *enumerator = 0; - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::DAdvise(FORMATETC *format, dword advf, IAdviseSink *sink, dword *connection) -{ - LOGMETHOD("IDataObject::DAdvise"); - *connection = advise_sinks.Add(sink); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::DUnadvise(dword connection) -{ - LOGMETHOD("IDataObject::DUnadvise"); - return LOGRESULT(advise_sinks.Remove(connection) ? S_OK : E_FAIL); -} - -HRESULT OcxControl::EnumDAdvise(IEnumSTATDATA **enumerator) -{ - LOGMETHOD("IDataObject::EnumDAdvise"); - *enumerator = 0; - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::Draw(DWORD aspect, LONG index, void *aspectinfo, - DVTARGETDEVICE *device, HDC target, HDC draw_dc, - const RECTL *bounds, const RECTL *wbounds, - BOOL (STDMETHODCALLTYPE *progress)(ULONG_PTR dwContinue), ULONG_PTR arg) -{ - LOGMETHOD("IViewObject::Draw"); - if(aspect != DVASPECT_CONTENT) - return DV_E_DVASPECT; -// if(IsClosed() && !CreateControl(0)) // create forged control to make paint routines work -// return E_FAIL; - Rect rc(GetSize()); - if(bounds) - { - rc.left = bounds->left; - rc.top = bounds->top; - rc.right = bounds->right; - rc.bottom = bounds->bottom; - LPtoDP(draw_dc, reinterpret_cast(&rc), 2); - } -// if(IsForged()) -// SetCtrlRect(rc); - - Point worg, vorg; - Size wext, vext; - SetWindowOrgEx(draw_dc, 0, 0, worg); - SetWindowExtEx(draw_dc, 1, 1, wext); - SetViewportOrgEx(draw_dc, 0, 0, vorg); - SetViewportExtEx(draw_dc, 1, 1, vext); - int old_mode = SetMapMode(draw_dc, MM_TEXT); - - SystemDraw draw(draw_dc); - draw.Offset(rc.TopLeft()); - DrawCtrl(draw); - draw.End(); - - SetMapMode(draw_dc, old_mode); - SetWindowOrgEx(draw_dc, worg.x, worg.y, 0); - SetWindowExtEx(draw_dc, wext.cx, wext.cy, 0); - SetViewportOrgEx(draw_dc, vorg.x, vorg.y, 0); - SetViewportExtEx(draw_dc, vext.cx, vext.cy, 0); - -// DUMP(GetMapMode(draw_dc)); -// DUMP(::GetWindow(draw_dc)); -// DUMP(GetViewport(draw_dc)); -// ::Draw draw(draw_dc); -// draw.DrawRect(rc, Yellow); -// draw.Clipoff(rc); -// CtrlPaint(draw); -// draw.End(); - - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::GetColorSet(dword aspect, long index, void *aspectinfo, - DVTARGETDEVICE *device, HDC target, LOGPALETTE **palette) -{ - LOGMETHOD("IViewObject::GetColorSet"); - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::Freeze(dword aspect, long index, void *aspectinfo, dword *freeze_key) -{ - LOGMETHOD("IViewObject::Freeze"); - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::Unfreeze(dword freeze_key) -{ - LOGMETHOD("IViewObject::Unfreeze"); - return LOGRESULT(E_NOTIMPL); -} - -HRESULT OcxControl::SetAdvise(dword aspect, dword advf, IAdviseSink *sink) -{ - LOGMETHOD("IViewObject::SetAdvise(aspect = " << aspect << ", advf = " << advf << ")"); - view_sink_aspect = aspect; - view_sink_advf = advf; - view_sink = sink; - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::GetAdvise(dword *aspect, dword *advf, IAdviseSink **sink) -{ - LOGMETHOD("IViewObject::GetAdvise"); - if(aspect) *aspect = view_sink_aspect; - if(advf) *advf = view_sink_advf; - if(sink && (*sink = ~view_sink)) - (**sink).AddRef(); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::GetExtent(dword aspect, long index, DVTARGETDEVICE *device, SIZEL *size) -{ - LOGMETHOD("IViewObject2::GetExtent"); - *size = GetRect().Size(); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::GetRect(dword aspect, RECTL *rc) -{ - LOGMETHOD("IViewObjectEx::GetRect(aspect = " << aspect << ")"); - if(aspect != DVASPECT_CONTENT) - return E_NOTIMPL; - if(!rc) - return E_INVALIDARG; - *rc = ToRectL(GetRect()); - return S_OK; -} - -HRESULT OcxControl::GetViewStatus(dword *status) -{ - LOGMETHOD("IViewObjectEx::GetViewStatus"); - *status = (IsTransparent() ? 0 : DVASPECT_OPAQUE); - return S_OK; -} - -HRESULT OcxControl::QueryHitPoint(dword aspect, const RECT *bounds, POINT pos, long close_hint, dword *result) -{ - LOGMETHOD("IViewObjectEx::QueryHitPoint"); - if(!result) - return E_INVALIDARG; - if(aspect != DVASPECT_CONTENT) - return E_FAIL; - *result = PtInRect(bounds, pos) ? HITRESULT_HIT : HITRESULT_OUTSIDE; - return S_OK; -} - -HRESULT OcxControl::QueryHitRect(dword aspect, const RECT *bounds, const RECT *rc, long close_hint, dword *result) -{ - LOGMETHOD("IViewObjectEx::QueryHitRect"); - if(!result) - return E_INVALIDARG; - if(aspect != DVASPECT_CONTENT) - return E_FAIL; - *result = Rect(*bounds).Contains(Rect(*rc)) ? HITRESULT_HIT : HITRESULT_OUTSIDE; - return S_OK; -} - -HRESULT OcxControl::GetNaturalExtent(dword aspect, long index, DVTARGETDEVICE *ptd, HDC tdc, DVEXTENTINFO *extinfo, SIZEL *psize) -{ - LOGMETHOD("IViewObjectEx::GetNaturalExtent"); - if(aspect != DVASPECT_CONTENT) - return E_FAIL; - if(psize) - *psize = GetRect().Size(); - return S_OK; -} - -HRESULT OcxControl::GetWindow(HWND *hwnd) -{ - LOGMETHOD("IOleWindow::GetWindow"); - if(!hwnd) - return LOGRESULT(E_INVALIDARG); - return LOGRESULT((*hwnd = GetHWND()) ? S_OK : E_FAIL); -} - -HRESULT OcxControl::ContextSensitiveHelp(BOOL enter_mode) -{ - LOGMETHOD("IOleWindow::ContextSensitiveHelp"); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::InPlaceDeactivate() -{ - LOGMETHOD("IOleInPlaceObject::InPlaceDeactivate"); - if(!IsActive()) - return LOGRESULT(S_OK); - UIDeactivate(); - if(!!in_place_site) - in_place_site->OnInPlaceDeactivate(); - if(IsOpen() && !IsChild()) - Ctrl::Close(); - in_place_site.Clear(); - client_site.Clear(); - status = CLOSED; - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::UIDeactivate() -{ - LOGMETHOD("IOleInPlaceObject::UIDeactivate"); - - if(!IsUIActive()) - return LOGRESULT(S_OK); // no work needed when not UI active - - if(!in_place_site) - return LOGRESULT(E_FAIL); - - SetActiveObject(false); - return LOGRESULT(in_place_site->OnUIDeactivate(false)); -} - -HRESULT OcxControl::SetObjectRects(const RECT *pos, const RECT *clip) -{ - LOGMETHOD("IOleInPlaceObject::SetObjectRects(pos = " << Rect(*pos) << ", clip = " << Rect(*clip) << ")"); - if(!pos || !clip) - return LOGRESULT(E_INVALIDARG); - Rect rc(Point(pos->left, pos->top), extent_size); - OCXLOG("-> Ctrl rc = " << rc << " (extent size = " << extent_size << ")"); - SetRect(rc); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::ReactivateAndUndo() -{ - LOGMETHOD("IOleInPlaceObject::ReactivateAndUndo"); - if(!IsActive()) - return OLE_E_NOT_INPLACEACTIVE; - return DoVerbUIActivate(); -} - -HRESULT OcxControl::TranslateAccelerator(MSG *msg) -{ - LOGMETHOD("IOleInPlaceObject::TranslateAccelerator"); - dword keycode = 0; - if(msg->message == WM_KEYDOWN) - keycode = KEYtoK((dword)msg->wParam); - else if(msg->message == WM_KEYUP) - keycode = KEYtoK((dword)msg->wParam) | K_KEYUP; - else if(msg->message == WM_SYSKEYDOWN && (msg->lParam & 0x20000000)) - keycode = KEYtoK((dword)msg->wParam); - else if(msg->message == WM_SYSKEYUP && (msg->lParam & 0x20000000)) - keycode = KEYtoK((dword)msg->wParam) | K_KEYUP; - else if(msg->message == WM_CHAR) - keycode = (dword)msg->wParam; - if(keycode == 0 || !IsActive() || !IsEnabled() || !IsVisible()) - return LOGRESULT(S_FALSE); - - return LOGRESULT(HotKey(keycode) ? S_OK : S_FALSE); -} - -HRESULT OcxControl::OnFrameWindowActivate(BOOL activate) -{ - LOGMETHOD("IOleInPlaceObject::OnFrameWindowActivate"); - Refresh(); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::OnDocWindowActivate(BOOL activate) -{ - LOGMETHOD("IOleInPlaceObject::OnDocWindowActivate"); - Refresh(); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::ResizeBorder(const RECT *border, IOleInPlaceUIWindow *ui, BOOL frame) -{ - LOGMETHOD("IOleInPlaceObject::ResizeBorder"); - Refresh(); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::EnableModeless(BOOL enable) -{ - LOGMETHOD("IOleInPlaceObject::EnableModeless"); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::GetControlInfo(CONTROLINFO *cinfo) -{ - LOGMETHOD("IOleControl::GetControlInfo"); - if(!cinfo) - return LOGRESULT(E_INVALIDARG); - cinfo->hAccel = 0; - cinfo->cAccel = 0; - cinfo->dwFlags = 0; // by default eat neither Return nor Escape - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::OnMnemonic(MSG *msg) -{ - LOGMETHOD("IOleControl::OnMnemonic"); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::OnAmbientPropertyChange(DISPID dispid) -{ - LOGMETHOD("IOleControl::OnAmbientPropertyChange"); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::FreezeEvents(BOOL freeze) -{ - LOGMETHOD("IOleControl::FreezeEvents(" << (freeze ? "on" : "off") << ")"); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::DoVerbPrimary() -{ - LOGMETHOD("DoVerbPrimary"); - return LOGRESULT(ShowControl(true)); -} - -HRESULT OcxControl::DoVerbShow() -{ - LOGMETHOD("DoVerbShow"); - return LOGRESULT(ShowControl(false)); -} - -HRESULT OcxControl::ShowControl(bool ui_activate) -{ - LOGMETHOD("OcxControl::ShowControl(" << (ui_activate ? "UI activate" : "") << ")"); - - if(!in_place_site) - return LOGRESULT(E_FAIL); - - HRESULT hr; - - if(!IsActive()) - { - HWND parent = 0; - - if((hr = in_place_site->CanInPlaceActivate()) != S_OK - || FAILED(hr = in_place_site->OnInPlaceActivate()) - || FAILED(hr = in_place_site->GetWindow(&parent))) - return LOGRESULT(hr); - - if(!parent || !::IsWindow(parent)) - return E_FAIL; - - UpdateControlRect(); - - if(!Open(parent)) - return LOGRESULT(E_FAIL); - - Show(); - Enable(); - -// todo: fire view change -// if(view_sink) -// { -// view_sink->OnViewChange(DVASPECT_CONTENT, -1); -// if(view_sink_advf & ADVF_ONLYONCE) -// view_sink = 0; -// } -// - } - - if(ui_activate && !IsUIActive() && SUCCEEDED(in_place_site->OnUIActivate())) - status = UIACTIVE; - - Show(); - Enable(); - if(!HasFocusDeep() && !SetWantFocus() && GetFirstChild()) - IterateFocusForward(GetFirstChild(), this); - SetActiveObject(true); - - return LOGRESULT(client_site->ShowObject()); -} - -HRESULT OcxControl::DoVerbInPlaceActivate() -{ - LOGMETHOD("DoVerbInPlaceActivate"); - return LOGRESULT(ShowControl(false)); -} - -HRESULT OcxControl::DoVerbUIActivate() -{ - LOGMETHOD("DoVerbUIActivate"); - return LOGRESULT(ShowControl(true)); -} - -HRESULT OcxControl::DoVerbHide() -{ - LOGMETHOD("DoVerbHide"); - Hide(); -// Close(false); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::DoVerbOpen() -{ - LOGMETHOD("DoVerbOpen"); - return LOGRESULT(ShowControl(false)); -} - -HRESULT OcxControl::DoVerbDiscardUndo() -{ - LOGMETHOD("DoVerbDiscardUndo"); - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::DoVerbProperties() -{ - LOGMETHOD("DoVerbProperties"); - return LOGRESULT(S_OK); -} - -void OcxControl::UpdateControlRect() -{ - LOGMETHOD("OcxControl::UpdateControlRect"); - - if(!in_place_site) - return; - - IOleInPlaceFramePtr frame; - IOleInPlaceUIWindowPtr ui_window; - OLEINPLACEFRAMEINFO frame_info = { sizeof(frame_info) }; - Rect rc, clip; - if(FAILED(in_place_site->GetWindowContext(&frame, &ui_window, rc, clip, &frame_info))) - return; - - OCXLOG("Control rect: " << rc << ", clip = " << clip); - SetRect(rc); -} - -void OcxControl::SetActiveObject(bool set) -{ - LOGMETHOD("OcxControl::SetActiveObject"); - if(!in_place_site) - return; - - IRef frame; - IRef ui_window; - OLEINPLACEFRAMEINFO frame_info = { sizeof(frame_info) }; - Rect rc, clip; - if(FAILED(in_place_site->GetWindowContext(frame.Set(), ui_window.Set(), rc, clip, &frame_info))) - return; - - if(!!frame) { - frame->SetActiveObject(set ? this : 0, 0); - if(set) - frame->SetBorderSpace(0); - } - if(!!ui_window) { - ui_window->SetActiveObject(set ? this : 0, 0); - if(set) - ui_window->SetBorderSpace(0); - } -} - -void OcxControl::RefreshSink() -{ - LOGMETHOD("OcxControl::RefreshSink"); - if(!!view_sink) - view_sink->OnViewChange(DVASPECT_CONTENT, -1); -} - -HRESULT OcxControl::GetActivationPolicy(DWORD *pdwPolicy) -{ - LOGMETHOD("IPointerInactive::GetActivationPolicy"); - *pdwPolicy = POINTERINACTIVE_ACTIVATEONENTRY; - return LOGRESULT(S_OK); -} - -HRESULT OcxControl::OnInactiveMouseMove(LPCRECT pRectBounds, LONG x, LONG y, DWORD grfKeyState) -{ - LOGMETHOD("IPointerInactive::OnInactiveMouseMove"); - return S_OK; -} - -HRESULT OcxControl::OnInactiveSetCursor(LPCRECT pRectBounds, LONG x, LONG y, DWORD dwMouseMsg, BOOL fSetAlways) -{ - LOGMETHOD("IPointerInactive::InactiveSetCursor"); - return S_OK; -} - -HRESULT OcxRunnableControl::GetRunningClass(GUID *clsid) -{ - LOGMETHOD("IRunnableObject::GetRunningClass"); - *clsid = __uuidof(0); - return LOGRESULT(E_UNEXPECTED); -} - -HRESULT OcxRunnableControl::Run(LPBC ctx) -{ - LOGMETHOD("IRunnableObject::Run"); - return LOGRESULT(S_OK); -} - -BOOL OcxRunnableControl::IsRunning() -{ - LOGMETHOD("IRunnableObject::IsRunning"); - return true; -} - -HRESULT OcxRunnableControl::LockRunning(BOOL lock, BOOL last_unlock_closes) -{ - LOGMETHOD("IRunnableObject::LockRunning"); - return LOGRESULT(S_OK); -} - -HRESULT OcxRunnableControl::SetContainedObject(BOOL contained) -{ - LOGMETHOD("IRunnableObject::SetContainedObject"); - return LOGRESULT(S_OK); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPoint::Enumerator::Next(unsigned long count, CONNECTDATA *data, unsigned long *fetched) -{ - LOGMETHOD("IConnectionPoint::IEnumConnections::Next(" << (int)count << ")"); - if(!point) - return LOGRESULT(E_FAIL); - if(count == 0 || !data || !fetched) - return LOGRESULT(E_INVALIDARG); - int avail = min(count, point->conn_map.GetCount() - index); - if(avail <= 0) - { - *fetched = 0; - return LOGRESULT(S_OK); - } - *fetched = avail; - while(--avail >= 0) - { - data->pUnk = point->conn_map[index].AddRef(); - data->dwCookie = point->conn_map.GetKey(index); - index++; - data++; - } - return LOGRESULT(S_OK); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPoint::Enumerator::Skip(unsigned long connections) -{ - LOGMETHOD("IConnectionPoint::IEnumConnections::Skip(" << (int)connections << ")"); - index += connections; - return LOGRESULT(S_OK); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPoint::Enumerator::Reset() -{ - LOGMETHOD("IConnectionPoint::IEnumConnections::Reset()"); - index = 0; - return LOGRESULT(S_OK); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPoint::Enumerator::Clone(IEnumConnections **enum_conn) -{ - LOGMETHOD("IConnectionPoint::IEnumConnections::Clone()"); - Enumerator *enumerator = new OcxObjectWrapper; - enumerator->Attach(~point); - *enum_conn = enumerator; - return LOGRESULT(S_OK); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPoint::GetConnectionInterface(IID *iid) -{ - LOGMETHOD("IConnectionPoint::GetConnectionInterface()"); - *iid = guid; - return LOGRESULT(S_OK); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPoint::GetConnectionPointContainer(IConnectionPointContainer **cpc) -{ - LOGMETHOD("IConnectionPoint::GetConnectionPointContainer()"); - *cpc = container; - if(container) - { - container->AddRef(); - return LOGRESULT(S_OK); - } - return LOGRESULT(E_FAIL); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPoint::Advise(IUnknown *ptr, DWORD *cookie) -{ - LOGMETHOD("IConnectionPoint::Advise()"); - IRef pif; - if(!cookie || !ptr || FAILED(ptr->QueryInterface(guid, pif.SetVoid()))) - return LOGRESULT(E_INVALIDARG); // required interface not found - *cookie = (free_id.IsEmpty() ? conn_map.GetCount() : free_id.Pop()); - conn_map.Add(*cookie) = pif; - return LOGRESULT(S_OK); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPoint::Unadvise(DWORD cookie) -{ - LOGMETHOD("IConnectionPoint::Unadvise(" << (int)cookie << ")"); - int p = conn_map.Find(cookie); - if(p < 0) - return LOGRESULT(E_INVALIDARG); - conn_map.Remove(p); - free_id.Add(cookie); - return LOGRESULT(S_OK); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPoint::EnumConnections(IEnumConnections **enum_conn) -{ - LOGMETHOD("IConnectionPoint::EnumConnections()"); - Enumerator *enumerator = new OcxObjectWrapper; - enumerator->Attach(this); - *enum_conn = enumerator; - return LOGRESULT(S_OK); -} - -void OcxConnectionPoint::FireEvent(int method_id, const Vector& values) -{ - LOGMETHOD("OcxConnectionPoint::FireEvent"); - int i, nargs = values.GetCount(); - Buffer args(nargs); - for(i = 0; i < nargs; i++) - { - VARIANTARG& out = args[i]; - out.vt = VT_EMPTY; - VariantCopy(&out, &ValueToVariant(values[nargs - i - 1])); - } - DISPPARAMS disp = { args, 0, (UINT)nargs, 0 }; - for(i = 0; i < conn_map.GetCount(); i++) - conn_map[i]->Invoke(method_id, IID_NULL, 0, DISPATCH_METHOD, &disp, NULL, NULL, NULL); - for(i = 0; i < nargs; i++) - VariantClear(&args[i]); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPointContainer::Enumerator::Next(unsigned long count, IConnectionPoint **data, unsigned long *fetched) -{ - LOGMETHOD("IConnectionPointContainer::IEnumConnectionPoints::Next(" << (int)count << ")"); - if(!point) - return LOGRESULT(E_FAIL); - if(count == 0 || !data || !fetched) - return LOGRESULT(E_INVALIDARG); - int avail = min(count, point->point_map.GetCount() - index); - if(avail <= 0) - { - *fetched = 0; - return LOGRESULT(S_OK); - } - *fetched = avail; - while(--avail >= 0) - { - *data = point->point_map[index]; - (*data)->AddRef(); - index++; - data++; - } - return LOGRESULT(S_OK); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPointContainer::Enumerator::Skip(unsigned long connections) -{ - LOGMETHOD("IConnectionPointContainer::IEnumConnectionPoints::Skip(" << (int)connections << ")"); - index += connections; - return LOGRESULT(S_OK); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPointContainer::Enumerator::Reset() -{ - LOGMETHOD("IConnectionPointContainer::IEnumConnectionPoints::Reset()"); - index = 0; - return LOGRESULT(S_OK); -} - -HRESULT STDMETHODCALLTYPE OcxConnectionPointContainer::Enumerator::Clone(IEnumConnectionPoints **enum_conn) -{ - LOGMETHOD("IConnectionPointContainer::IEnumConnectionPoints::Clone()"); - Enumerator *enumerator = new OcxObjectWrapper; - enumerator->Attach(~point); - *enum_conn = enumerator; - return LOGRESULT(S_OK); -} - -OcxConnectionPointContainer::OcxConnectionPointContainer() -{ -} - -HRESULT OcxConnectionPointContainer::EnumConnectionPoints(IEnumConnectionPoints **ppEnum) -{ - LOGMETHOD("IConnectionPointContainer::EnumConnectionPoints()"); - Enumerator *enumerator = new OcxObjectWrapper; - enumerator->Attach(this); - *ppEnum = enumerator; - return LOGRESULT(S_OK); -} - -HRESULT OcxConnectionPointContainer::FindConnectionPoint(REFIID riid, IConnectionPoint **ppCP) -{ - Guid guid(riid); - LOGMETHOD("IConnectionPointContainer::FindConnectionPoint(" << guid << ", ppCP = " << FormatIntHex(ppCP) << ")"); - int i = point_map.Find(guid); - RLOG("point_map.Find(guid) = " << i); - if(i < 0) { - *ppCP = 0; - return LOGRESULT(CONNECT_E_NOCONNECTION); - } - (*ppCP = point_map[i])->AddRef(); - return LOGRESULT(S_OK); -} - -} - -#endif diff --git a/archive/uppsrc/Ole/Ctrl/ocx.def b/archive/uppsrc/Ole/Ctrl/ocx.def deleted file mode 100644 index 83490bc4a..000000000 --- a/archive/uppsrc/Ole/Ctrl/ocx.def +++ /dev/null @@ -1,7 +0,0 @@ -LIBRARY "test.ocx" - -EXPORTS - DllCanUnloadNow PRIVATE - DllGetClassObject PRIVATE - DllRegisterServer PRIVATE - DllUnregisterServer PRIVATE diff --git a/archive/uppsrc/Ole/Ctrl/selftest.cpp b/archive/uppsrc/Ole/Ctrl/selftest.cpp deleted file mode 100644 index 7ff8cbb5a..000000000 --- a/archive/uppsrc/Ole/Ctrl/selftest.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include - -#ifdef flagMAIN - -BOOL WINAPI DllMain(HINSTANCE hinstDll, DWORD fdwReason, LPVOID lpReserved) -{ - switch(fdwReason) { - case DLL_PROCESS_ATTACH: { - Ctrl::InitWin32(hinstDll); - AppInitEnvironment__(); - break; - } - case DLL_PROCESS_DETACH: { - Ctrl::CloseTopCtrls(); - break; - } - case DLL_THREAD_ATTACH: - break; - case DLL_THREAD_DETACH: - break; - } - return true; -} - -#endif diff --git a/archive/uppsrc/Ole/Ctrl/util.cpp b/archive/uppsrc/Ole/Ctrl/util.cpp deleted file mode 100644 index 079cda4c8..000000000 --- a/archive/uppsrc/Ole/Ctrl/util.cpp +++ /dev/null @@ -1,741 +0,0 @@ -#include - -#ifdef PLATFORM_WIN32 - -#define LDUMP(x) -#define LLOG(x) - -namespace Upp { - -enum { HIMETRIC_INCH = 2540 }; // HIMETRIC units per inch - -SystemDraw& ScreenInfo(); - -Size ToHiMetric(Size pixel_size) -{ - static Size logdpi = ScreenInfo().GetSizeCaps(LOGPIXELSX, LOGPIXELSY); - return Size( - iscaleceil(pixel_size.cx, HIMETRIC_INCH, logdpi.cx), - iscaleceil(pixel_size.cy, HIMETRIC_INCH, logdpi.cy)); -} - -Size FromHiMetric(Size himetric_size) -{ - static Size logdpi = ScreenInfo().GetSizeCaps(LOGPIXELSX, LOGPIXELSY); - return Size( - iscalefloor(himetric_size.cx, logdpi.cx, HIMETRIC_INCH), - iscalefloor(himetric_size.cy, logdpi.cy, HIMETRIC_INCH)); -} - -Rect GetWindow(HDC hdc) -{ - Point pt; - Size sz; - GetWindowOrgEx(hdc, pt); - GetWindowExtEx(hdc, sz); - return Rect(pt, sz); -} - -Rect GetViewport(HDC hdc) -{ - Point pt; - Size sz; - GetViewportOrgEx(hdc, pt); - GetViewportExtEx(hdc, sz); - return Rect(pt, sz); -} - -OcxObject::OcxObject() -: ocx_info(0) -{ - inner_unknown.owner = this; - outer_unknown = NULL; -} - -int OcxObject::ExternalAddRef() -{ - if(outer_unknown) { - int res = outer_unknown->AddRef(); -#if LOG_ADDREFS - OCXLOG("OcxObject::ExternalAddRef -> outer(" << FormatIntHex(outer_unknown) << ") -> " << res); -#endif - return res; - } - return InternalAddRef(); -} - -int OcxObject::ExternalRelease() -{ - if(outer_unknown) { - int res = outer_unknown->Release(); -#if LOG_ADDREFS - // note: this might have been destructed by this time - OCXLOG("OcxObject::ExternalRelease -> outer(" << FormatIntHex(outer_unknown) << ") -> " << res); -#endif - return res; - } - return InternalRelease(); -} - -HRESULT OcxObject::ExternalQueryInterface(const GUID& iid, void **ppv) -{ - if(outer_unknown) { - HRESULT hr = outer_unknown->QueryInterface(iid, ppv); -#if LOG_QUERIES >= 2 - OCXLOG("OcxObject::ExternalQueryInterface(" << GetInterfaceName(iid) << ") -> outer(" << FormatIntHex(outer_unknown) << ") -> " << FormatIntHex(hr)); -#endif - return hr; - } - return InternalQueryInterface(iid, ppv); -} - -HRESULT OcxObject::InternalQueryInterface(const GUID& iid, void **ppv) -{ -#if LOG_QUERIES >= 2 - OCXLOG("OcxObject::InternalQueryInterface -> " << GetInterfaceName(iid)); -#endif - int i; - IUnknown *punk; - if(iid == IID_IUnknown) - punk = static_cast(&inner_unknown); - else if((i = interface_map.Find(iid)) >= 0) - punk = interface_map[i]; - else { - *ppv = 0; -#if LOG_QUERIES >= 1 - String name; - if(ocx_info) - name = ocx_info->GetName(); - else - name = ""; -#endif - LOGQUERY("\t\tcast ERROR: " << name << " -> "<< GetInterfaceName(iid) << ", " << Guid(iid)); -#if LOG_QUERIES >= 3 - OCXLOG("\tGUID = " << Format(iid)); - for(int i = 0; i < interface_map.GetCount(); i++) { - const GUID& imid = interface_map.GetKey(i); - String n = GetInterfaceName(imid); - if(n.GetLength() < 30) - n.Cat(' ', 30 - n.GetLength()); - OCXLOG("\t\t\t" << n << " - " << Format(imid)); - } -#endif - return E_NOINTERFACE; - } - punk->AddRef(); - *ppv = punk; -#if LOG_QUERIES >= 2 - String name; - if(ocx_info) - name = ocx_info->GetName(); - else - name = ""; - OCXLOG("\t\tcast OK: " << name << " -> " << GetInterfaceName(iid)); -#endif - return S_OK; -} - -HRESULT OcxObject::RawGetTypeInfo(IRef& typeinfo, unsigned tinfo, LCID lcid, ITypeInfo **ppinfo) -{ - if(tinfo != 0) - return DISP_E_BADINDEX; - if(!typeinfo) - return E_FAIL; - // currently ignore lcid - *ppinfo = typeinfo.AddRef(); - return S_OK; -} - -HRESULT OcxObject::RawGetIDsOfNames(IRef& typeinfo, REFIID riid, OLECHAR **names, unsigned cnames, LCID lcid, DISPID *dispid) -{ - if(!typeinfo) - return E_FAIL; - return typeinfo->GetIDsOfNames(names, cnames, dispid); -} - -HRESULT OcxObject::RawInvoke(IRef& typeinfo, IDispatch *dispatch, DISPID dispid, word flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep, unsigned *arg_err) -{ - LOGINVOKE("IDispatch::Invoke"); - if(dispid == 0) { // convert object to dispatch value - if(!result) return E_INVALIDARG; - result->vt = VT_DISPATCH; - result->pdispVal = dispatch; - if(dispatch) dispatch->AddRef(); - return S_OK; - } - if(!typeinfo) { - LOG("dispid = " << FormatIntHex(dispid) << ": typeinfo = NULL"); - return E_FAIL; - } -#if LOG_INVOKES >= 1 - BSTR names[1] = { NULL }; - unsigned count = 0; - typeinfo->GetNames(dispid, names, 1, &count); - String name; - if(names[0]) - name = BSTRToString(names[0]); - else - name = FormatIntHex(dispid); - switch(flags) { - case DISPATCH_METHOD: name << " - method"; break; - case DISPATCH_PROPERTYGET: name << " - propget"; break; - case DISPATCH_PROPERTYPUT: name << " - propput"; break; - case DISPATCH_PROPERTYPUTREF: name << " - propputref"; break; - } - LOG("Member name: " << name); -#endif - if(!typeinfo) - return E_FAIL; - TYPEATTR *attr; - typeinfo->GetTypeAttr(&attr); - LOGINVOKE("GetTypeInfo: typekind = " << (int)attr->typekind); -// HRESULT res = typeinfo->Invoke(dispatch, dispid, flags, params, result, excep, arg_err); - HRESULT res = DispInvoke(dispatch, ~typeinfo, dispid, flags, params, result, excep, arg_err); - if(FAILED(res)) { - LLOG("failure: dispid = " << (int)dispid << ", #args = " << (int)params->cArgs - << ", #named args = " << (int)params->cNamedArgs << ", return " << FormatIntHex(result)); - for(int i = 0; i < (int)params->cArgs; i++) { - LLOG("arg[" << i << "] (vt = " << (int)params->rgvarg[i].vt << "): " << StdFormat(AsValue(params->rgvarg[i]))); - } - LLOG("#funcs = " << attr->cFuncs); - for(int i = 0; i < attr->cFuncs; i++) { - FUNCDESC *func; - typeinfo->GetFuncDesc(i, &func); - LLOG("memid = " << func->memid << ", cParams " << func->cParams - << ", cParamsOpt = " << func->cParamsOpt << ", cScodes " << func->cScodes - << ", funckind = " << (int)func->funckind << ", invkind " << (int)func->invkind - << ", flags = " << FormatIntHex(func->wFuncFlags)); - - typeinfo->ReleaseFuncDesc(func); - } - } - typeinfo->ReleaseTypeAttr(attr); - LOGINVOKE("//IDispatch::Invoke"); - return LOGRESULT(res); -} - -HRESULT OcxProvideClassInfo::GetClassInfo(ITypeInfo **info) -{ - if(!info) return E_INVALIDARG; - if(!ocx_info) { - *info = NULL; - return E_POINTER; - } - *info = ocx_info->GetCoClassTypeInfo().AddRef(); - return S_OK; -} - -HRESULT OcxProvideClassInfo::GetGUID(dword guidkind, GUID *guid) -{ - if(!guid) - return E_POINTER; - if(!ocx_info) { - *guid = __uuidof(0); - return E_NOTIMPL; - } - if(guidkind == GUIDKIND_DEFAULT_SOURCE_DISP_IID) { - *guid = ~ocx_info->GetEventGUID(); - return ocx_info->GetEventGUID().IsEmpty() ? E_UNEXPECTED : S_OK; - } - return E_INVALIDARG; -} - -OcxTypeInfo::OcxTypeInfo(const GUID& coclass_guid, /*const GUID& dispatch_guid,*/ const GUID& event_guid, - New new_fn, String name, const char* help, int ver, bool is_control) -: coclass_guid(coclass_guid), /*dispatch_guid(dispatch_guid),*/ event_guid(event_guid) -, new_fn(new_fn), name(name), help(help), ver(ver), is_control(is_control) -, object_count(0) -, refcount(1) -, lock_count(0) -#ifndef _USRDLL -, registration(0) -#endif -{ - LLOG("OcxTypeInfo ctr (" << name << ", " << Guid(coclass_guid) << ")"); - OcxTypeLib::Get().Add(*this); -} - -bool OcxTypeInfo::CanUnload() const -{ - LLOG("OcxTypeInfo::CanUnload(" << name << ", " << Guid(coclass_guid) << ")"); - LDUMP(object_count); - LDUMP(refcount); - return object_count == 0 && refcount <= 2 && lock_count <= 0; -} - -int OcxTypeInfo::IncRef() -{ - int res = InterlockedIncrement(&refcount); - LLOG("OcxTypeInfo::IncRef(" << name << " -> " << res << ")"); - return res; -} - -int OcxTypeInfo::DecRef() -{ - int res = InterlockedDecrement(&refcount); - LLOG("OcxTypeInfo::DecRef(" << name << " -> " << res << ")"); - VERIFY(res > 0); // if this throws, the factory has been over-released - return res; -} - -GLOBAL_VAR(InitProc, LateInitProc); -GLOBAL_VAR(InitProc, LateExitProc); -static bool inited = false; - -void DoLateInit() -{ - if(!inited) { - INTERLOCKED - if(!inited) { - inited = true; - if(LateInitProc()) - LateInitProc()(); - } - } -} - -void DoLateExit() -{ - if(inited) { - INTERLOCKED - if(inited) { - inited = false; - if(LateExitProc()) - LateExitProc()(); - } - } -} - -HRESULT OcxTypeInfo::CreateInstance(IUnknown *outer, REFIID iid, void **object) -{ - LLOG("OcxTypeInfo::CreateInstance(" << name << ", iid = " << Guid(iid) << ", outer = " << FormatIntHex(outer) << ")"); - if(outer && iid != IID_IUnknown) - return CLASS_E_NOAGGREGATION; - try { - DoLateInit(); - OcxObject *ocxobj = new_fn(*this); - LOGCREATE("\tnew " << name << ": " << object_count << " instances in system"); - if(outer) - ocxobj->outer_unknown = outer; - HRESULT hr = ocxobj->InternalQueryInterface(iid, object); - LOGCREATE("//OcxTypeInfo::CreateInstance -> " << FormatIntHex(hr)); - return hr; - } - catch(Exc e) { - LLOG("OcxTypeInfo::CreateInstance error: " << e); - return E_OUTOFMEMORY; - } - catch(...) { - return E_OUTOFMEMORY; - } -} - -HRESULT OcxTypeInfo::LockServer(BOOL lock) -{ - LLOG("OcxTypeInfo::LockServer(" << name << ", " << lock << ")"); - if(lock) - AtomicInc(lock_count); - else - VERIFY(AtomicDec(lock_count) >= 0); // over-unlock check - return S_OK; -} - -HRESULT OcxTypeInfo::GetLicInfo(/* [out] */ LICINFO *pLicInfo) -{ - LLOG("OcxTypeInfo::GetLicInfo(" << name << ")"); - if(!pLicInfo) - return E_INVALIDARG; - pLicInfo->fLicVerified = TRUE; - pLicInfo->fRuntimeKeyAvail = 0; - return S_OK; -} - -HRESULT OcxTypeInfo::RequestLicKey(/* [in] */ DWORD dwReserved, /* [out] */ BSTR *pBstrKey) -{ - LLOG("OcxTypeInfo::RequestLicKey(" << name << ")"); - if(!pBstrKey) return E_INVALIDARG; - *pBstrKey = 0; - return S_OK; -} - -HRESULT OcxTypeInfo::CreateInstanceLic( - /* [in] */ IUnknown *pUnkOuter, - /* [in] */ IUnknown *pUnkReserved, - /* [in] */ REFIID riid, - /* [in] */ BSTR bstrKey, - /* [iid_is][out] */ PVOID *ppvObj) -{ - LLOG("OcxTypeInfo::CreateInstanceLic(" << name << ")"); - return CreateInstance(pUnkOuter, riid, ppvObj); -} - -void OcxTypeInfo::GetDispatchTypeInfo(IRef& dest, Guid dispatch_iid) -{ - if(!dest) { - CriticalSection::Lock lock(critical); - if(!dest) - dest = OcxTypeLib::Get().GetTypeInfo(dispatch_iid); - } -} - -IRef OcxTypeInfo::GetCoClassTypeInfo() -{ - if(!coclass_info && !coclass_guid.IsEmpty()) { // oportunity lock used to initialize type info - critical.Enter(); - if(!coclass_info) - coclass_info = OcxTypeLib::Get().GetTypeInfo(coclass_guid); - critical.Leave(); - } - return coclass_info; -} - -OcxTypeLib::OcxTypeLib() -: lib_ver(1) -{ - CoInitialize(0); -} - -OcxTypeLib& OcxTypeLib::Get() -{ - static OcxTypeLib ocx; - return ocx; -} - -String OcxTypeLib::GetLibName() const -{ - if(!IsNull(lib_name)) - return lib_name; - String s = ToLower(GetFileTitle(GetModuleFileName())); - if(!IsNull(s)) - s.Set(0, ToUpper(s[0])); - return s; -} - -bool OcxTypeLib::CanUnload() const -{ - for(int i = 0; i < objects.GetCount(); i++) - if(!objects[i]->CanUnload()) { - OCXLOG("OcxTypeLib::CanUnload failed for " << objects[i]->GetName()); - return false; - } - OCXLOG("OcxTypeLib::CanUnload succeeded"); - return true; -} - -IRef OcxTypeLib::GetTypeInfo(const Guid& guid) -{ - IRef outinfo; - HRESULT hr = GetTypeLib()->GetTypeInfoOfGuid(guid, outinfo.Set()); - if(FAILED(hr)) { - LOGSYSOCX("OcxTypeLib::GetTypeInfo(" << guid << ") -> hr = " << FormatIntHex(hr)); - for(int i = 0; i < uses_libraries.GetCount(); i++) { - if(!uses_libraries[i]) { - String libname = uses_libraries.GetKey(i); - WString wlibname = libname.ToWString(); - hr = LoadTypeLib(wlibname, uses_libraries[i].Set()); - if(!uses_libraries[i]) { - LOGSYSOCX("LoadTypeLib(" << libname << ") -> hr = " << FormatIntHex(hr)); - } - else { - LOGSYSOCX("LoadTypeLib(" << uses_libraries.GetKey(i) << ") -> succeeded"); - if(IsFullPath(libname)) { - hr = RegisterTypeLib(~uses_libraries[i], const_cast(~wlibname), NULL); - LOGSYSOCX("RegisterTypeLib(" << libname << ") -> hr = " << FormatIntHex(hr)); - } - } - } - if(!!uses_libraries[i]) { - hr = uses_libraries[i]->GetTypeInfoOfGuid(guid, outinfo.Set()); - if(!!outinfo) - return outinfo; - LOGSYSOCX("GetTypeInfoOfGuid(" << uses_libraries.GetKey(i) << ") -> hr = " << FormatIntHex(hr)); - } - } - } - return outinfo; -} - -HRESULT OcxTypeLib::Register() -{ - String modname = GetModuleFileName(); - String lib_name = GetLibName(); - LOGSYSOCX("Registering library \"" << modname << '\"'); - - HRESULT hr; - IRef& typelib = GetTypeLib(); - if(!typelib) - return SELFREG_E_TYPELIB; - TLIBATTR *attr; - if(FAILED(hr = typelib->GetLibAttr(&attr))) - return hr; - String lib_guid = Guid(attr->guid); - typelib->ReleaseTLibAttr(attr); - - for(int i = 0; i < objects.GetCount(); i++) { - const OcxTypeInfo& entry = *objects[i]; - String progID = lib_name; - String verID = progID << '.' << entry.name; - verID << '.' << (entry.ver ? entry.ver : lib_ver); - String guid = entry.coclass_guid; - LOGSYSOCX("Registering object " << verID << ", CLSID = " << guid); - String clss_key = "CLSID\\" + guid; -#ifdef _USRDLL - String server = clss_key + "\\InprocServer32"; -#endif - String version; - version << lib_ver << '.' << entry.ver; - String help = entry.help; - if(IsNull(help)) { - if(!IsNull(display_name)) - help << display_name << ' '; - help << entry.name << (entry.IsControl() ? " Control " : " Object ") << version; - } - DeleteWinReg(verID, HKEY_CLASSES_ROOT); - DeleteWinReg(progID, HKEY_CLASSES_ROOT); - DeleteWinReg(clss_key, HKEY_CLASSES_ROOT); - if(!SetWinRegString(help, NULL, verID, HKEY_CLASSES_ROOT) - || !SetWinRegString(guid, NULL, verID + "\\CLSID", HKEY_CLASSES_ROOT) - || !SetWinRegString(help, NULL, progID, HKEY_CLASSES_ROOT) - || !SetWinRegString(guid, NULL, progID + "\\CLSID", HKEY_CLASSES_ROOT) - || !SetWinRegString(help, NULL, clss_key, HKEY_CLASSES_ROOT) - || !SetWinRegString(verID, NULL, clss_key + "\\ProgID", HKEY_CLASSES_ROOT) - || !SetWinRegString(progID, NULL, clss_key + "\\VersionIndependentProgID", HKEY_CLASSES_ROOT) - || !SetWinRegString(lib_guid, NULL, clss_key + "\\TypeLib", HKEY_CLASSES_ROOT) -#ifdef _USRDLL - || !SetWinRegString(modname, NULL, server, HKEY_CLASSES_ROOT) - || !SetWinRegString("Apartment", "ThreadingModel", server, HKEY_CLASSES_ROOT) -#else - || !SetWinRegString(modname, NULL, clss_key + "\\LocalServer32", HKEY_CLASSES_ROOT) - || !SetWinRegString(modname, NULL, clss_key + "\\LocalServer", HKEY_CLASSES_ROOT) - || !SetWinRegString("ole32.dll", NULL, clss_key + "\\InprocHandler32", HKEY_CLASSES_ROOT) - || !SetWinRegString("ole2.dll", NULL, clss_key + "\\InprocHandler", HKEY_CLASSES_ROOT) -#endif - || !SetWinRegString(version, NULL, clss_key + "\\Version", HKEY_CLASSES_ROOT)) - return REGDB_E_WRITEREGDB; - if(entry.IsControl()) { - if(!SetWinRegString("", NULL, clss_key + "\\Control", HKEY_CLASSES_ROOT) - || !SetWinRegString(modname + ", 1", NULL, clss_key + "\\ToolboxBitmap32", HKEY_CLASSES_ROOT) - || !SetWinRegString("", NULL, verID + "\\Insertable", HKEY_CLASSES_ROOT) - || !SetWinRegString("", NULL, progID + "\\Insertable", HKEY_CLASSES_ROOT) - || !SetWinRegString("", NULL, clss_key + "\\Insertable", HKEY_CLASSES_ROOT)) - return REGDB_E_WRITEREGDB; - } - } - -// UniStr ulib = modname; - OleBstr ulib(modname); - if(FAILED(hr = RegisterTypeLib(~typelib, (wchar_t *)~ulib, ~ulib))) - return hr; - return S_OK; -} - -HRESULT OcxTypeLib::Unregister() -{ - String lib = GetModuleFileName(); - String lib_name = GetLibName(); - LOGSYSOCX("Unregistering library \"" << lib << '\"'); - for(int i = 0; i < objects.GetCount(); i++) { - const OcxTypeInfo& entry = *objects[i]; - String progID = lib_name; - String verID = progID << '.' << entry.name; - verID << '.' << (entry.ver ? entry.ver : lib_ver); - DeleteWinReg(verID, HKEY_CLASSES_ROOT); - DeleteWinReg(progID, HKEY_CLASSES_ROOT); - DeleteWinReg("CLSID\\" + String(entry.coclass_guid), HKEY_CLASSES_ROOT); - DeleteWinReg("SOFTWARE\\Classes\\" + verID, HKEY_LOCAL_MACHINE); - } - - IRef& typelib = GetTypeLib(); - if(!typelib) - return SELFREG_E_TYPELIB; - TLIBATTR *attr; - HRESULT hr; - if(FAILED(hr = typelib->GetLibAttr(&attr))) - return hr; - hr = UnRegisterTypeLib(attr->guid, - attr->wMajorVerNum, attr->wMinorVerNum, - attr->lcid, attr->syskind); - typelib->ReleaseTLibAttr(attr); - return hr; -} - -#ifndef _USRDLL -HRESULT OcxTypeLib::RegisterObjects() -{ - for(int i = 0; i < objects.GetCount(); i++) { - OcxTypeInfo& entry = *objects[i]; - HRESULT hr; - if(FAILED(hr = CoRegisterClassObject(entry.GetCoClassGUID(), &entry, - CLSCTX_SERVER, REGCLS_MULTIPLEUSE, &entry.registration))) { - RevokeObjects(); - return hr; - } - } - return S_OK; -} -#endif - -#ifndef _USRDLL -void OcxTypeLib::RevokeObjects() -{ - for(int i = 0; i < objects.GetCount(); i++) { - OcxTypeInfo& entry = *objects[i]; - if(entry.registration) { - CoRevokeClassObject(entry.registration); - entry.registration = 0; - } - } -} -#endif - -HRESULT OcxTypeLib::GetFactory(REFCLSID rclsid, REFIID iid, void **ppv) -{ - Guid clsid = rclsid; - LOGSYSOCX("OcxTypeLib::GetFactory(clsid = " << clsid << ", iid = " << Guid(iid) << ")"); - LLOG("#ocx_init = " << ocx_init.GetCount()); - - for(int i = 0; i < ocx_init.GetCount(); i++) - ocx_init[i](); - ocx_init.Clear(); - - LLOG("#objects = " << objects.GetCount()); - for(int i = 0; i < objects.GetCount(); i++) - LLOG("object[" << i << "] = " << Guid(objects.GetKey(i))); - - *ppv = 0; - int f = objects.Find(clsid); - if(f < 0) - return CLASS_E_CLASSNOTAVAILABLE; - OcxTypeInfo *entry = objects[f]; - HRESULT res = entry->QueryInterface(iid, ppv); - LOGSYSOCX("//OcxTypeLib::GetFactory -> " << FormatIntHex(res)); - return res; -} - -IRef& OcxTypeLib::GetTypeLib() -{ - if(!typelib) { // opportunity lock used to initialize type library info - critical.Enter(); - if(!typelib) { - WString tlibname = GetModuleFileName().ToWString(); - HRESULT hr = LoadTypeLib(tlibname, typelib.Set()); - LOGSYSOCX("LoadTypeLib(" << tlibname << ") -> " << FormatIntHex(~typelib) << ", hr = " << FormatIntHex(hr)); - if(!!typelib) { - hr = RegisterTypeLib(~typelib, const_cast(~tlibname), NULL); - LOGSYSOCX("RegisterTypeLib -> hr = " << FormatIntHex(hr)); - } - } - critical.Leave(); - } - return typelib; -} - -#ifdef _USRDLL -STDAPI DllCanUnloadNow() -{ - LOGSYSOCX("DllCanUnloadNow"); -// DoLateInit(); - return (OcxTypeLib::Get().CanUnload() ? S_OK : S_FALSE); -} -#endif - -#ifdef _USRDLL -STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) -{ - LOGSYSOCX("DllGetClassObject, riid = " << Guid(riid)); - HRESULT res = OcxTypeLib::Get().GetFactory(rclsid, riid, ppv); - LOGSYSOCX("//DllGetClassObject -> " << FormatIntHex(res, 8) << ", ppv = " << FormatIntHex(*ppv)); - return res; -} -#endif - -#ifdef _USRDLL -STDAPI DllRegisterServer() -{ - LOGSYSOCX("DllRegisterServer"); - try { - DoLateInit(); - HRESULT hr = OcxTypeLib::Get().Register(); - if(SUCCEEDED(hr)) - LOGSYSOCX("-> succeeded"); - else - LOGSYSOCX("-> failed: " << GetErrorMessage(hr)); - return hr; - } - catch(_com_error e) { - LOGSYSOCX(e.Error()); - return e.Error(); - } -} -#endif - -#ifdef _USRDLL -STDAPI DllUnregisterServer() -{ - LOGSYSOCX("DllUnregisterServer"); - try { - DoLateInit(); - HRESULT hr = OcxTypeLib::Get().Unregister(); - LOGSYSOCX((SUCCEEDED(hr) ? "-> succeeded" : "-> failed")); - return hr; - } - catch(_com_error e) { - LOGSYSOCX(e.Error()); - return e.Error(); - } -} -#endif - -#ifndef _USRDLL -bool ExeRegisterServer() -{ - LOGSYSOCX("ExeRegisterServer"); - HRESULT hr = OcxTypeLib::Get().Register(); - if(FAILED(hr)) - LOGSYSOCX("-> error: " << GetErrorMessage(hr)); - return SUCCEEDED(hr); -} -#endif - -#ifndef _USRDLL -bool ExeUnregisterServer() -{ - LOGSYSOCX("ExeRegisterServer"); - HRESULT hr = OcxTypeLib::Get().Unregister(); - if(FAILED(hr)) - LOGSYSOCX("-> error: " << GetErrorMessage(hr)); - return SUCCEEDED(hr); -} -#endif - -#ifndef _USRDLL -void ExeRunServer() -{ - LOGSYSOCX("ExeRunServer"); -// PromptOK("Running server!"); - HRESULT hr; - if(FAILED(hr = OcxTypeLib::Get().RegisterObjects())) { - LOGSYSOCX("-> registration error: " << GetErrorMessage(hr)); - return; - } - LOGSYSOCX("-> registration OK"); - - int ms = msecs(); - bool quit = false; - while(!quit) { - if(msecs(ms) >= 2000) { - if(OcxTypeLib::Get().CanUnload()) - break; - ms = msecs(); - } - if(!Ctrl::ProcessEvents(&quit)) - Sleep(10); - } - LOGSYSOCX("end of message loop"); - OcxTypeLib::Get().RevokeObjects(); -} -#endif - -} - -#endif diff --git a/archive/uppsrc/Ole/Ole.h b/archive/uppsrc/Ole/Ole.h deleted file mode 100644 index fdca0be78..000000000 --- a/archive/uppsrc/Ole/Ole.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef OLE_H -#define OLE_H - -#include - -#if defined(PLATFORM_WIN32) && !defined(PLATFORM_WINCE) && defined(COMPILER_MSC) - -#define Ptr Ptr_ -#define StdFont StdFont_ -#define Font Font_ -#define Picture Picture_ -#define byte win32_byte_ // RpcNdr defines byte -> class with Upp::byte -#define CY win32_CY_ -#include -#include -#undef Ptr -#undef StdFont -#undef Font -#undef Picture -#undef byte -#undef CY - -#endif - -#include "util.h" - -#endif//OLE_H diff --git a/archive/uppsrc/Ole/Ole.upp b/archive/uppsrc/Ole/Ole.upp deleted file mode 100644 index 58b20d0ec..000000000 --- a/archive/uppsrc/Ole/Ole.upp +++ /dev/null @@ -1,14 +0,0 @@ -description "Windows OLE encapsulation\377"; - -uses - Core; - -library(WIN32) ole32; - -file - Ole.h, - util.h, - util.cpp, - Info readonly separator, - Copying; - diff --git a/archive/uppsrc/Ole/srcdoc.tpp/all.i b/archive/uppsrc/Ole/srcdoc.tpp/all.i deleted file mode 100644 index 694f8e996..000000000 --- a/archive/uppsrc/Ole/srcdoc.tpp/all.i +++ /dev/null @@ -1,3 +0,0 @@ -TOPIC("ocx_en-us") -#include "ocx_en-us.tpp" -END_TOPIC diff --git a/archive/uppsrc/Ole/srcdoc.tpp/ocx_en-us.tpp b/archive/uppsrc/Ole/srcdoc.tpp/ocx_en-us.tpp deleted file mode 100644 index 6e956fc59..000000000 --- a/archive/uppsrc/Ole/srcdoc.tpp/ocx_en-us.tpp +++ /dev/null @@ -1,50 +0,0 @@ -TITLE("Creating OCX Controls using U++") -TOPIC_TEXT( -"[2 $$0,0#00000000000000000000000000000000:Default][l288;i1120;a17;O9;~~~.1408;2 " -"$$1,0#10431211400427159095818037425705:param][a83;*R6 $$2,5#31310162474203024125188417583966:caption][b83;*4 " -"$$3,5#07864147445237544204411237157677:title][i288;O9;C2 $$4,6#40027414424643823182269349404212:item][b42;a42;2 " -"$$5,5#45413000475342174754091244180557:text][l288;b17;a17;2 $$6,6#27521748481378242620020725143825:desc][l321;t246;C@5;1 " -"$$7,7#20902679421464641399138805415013:code][b2503; $$8,0#65142375456100023862071332075487:separator][*@(0.0.255)2 " -"$$9,0#83433469410354161042741608181528:base][t4167;C $$10,0#37138531426314131251341829483380:class][l288;a17;*1 " -"$$11,11#70004532496200323422659154056402:requirement][i417;b42;a42;O9;~~~.416;2 $$12,12#10566046415157235020018451313112:tparam][b167;C2 " -"$$13,13#92430459443460461911108080531343:item1][i288;a42;O9;C2 $$14,14#77422149456609303542238260500223:item2][*@2$(0.128.128) " -"$$15,15#34511555403152284025741354420178:NewsDate][l321;*C$7;2 $$16,16#03451589433145915344929335295360:result][l321;b83;a83;*C$7;2 " -"$$17,17#07531550463529505371228428965313:result`-line][l160;t4167;*C+117 $$18,5#88603949442205825958800053222425:package`-title][ " -"$$19,0#53580023442335529039900623488521:gap][t4167;C2 $$20,20#70211524482531209251820423858195:class`-nested][b50;2 " -"$$21,21#03324558446220344731010354752573:Par][{_}%EN-US [s2; Creating OCX Controls " -"using U`+`+&][s0; &][s0;i150;O9; 1.-|Use the U`+`+ version later than 2005`-11`-24. " -"There was a very nasty bug in the OCX registration routine, capable of deleting half " -"of CLSID registry keys and consequently nuking Windows installation. (Actually, this " -"was not a bug in the routine as such, it was a bug in one of the overloads of the " -"AsString routine).&][s0; &][s0;i150;O9; 2.-|Add DLL to the main configuration flags. " -"This is more or less all that`'s needed to build into aDLL (OCX is technically a " -"DLL).&][s0; &][s0;i150;O9; 3.-|You have to build the OCX interface using MIDL. You " -"can use a custom step to do this:&][s0; &") -TOPIC_TEXT( -"][s7; Custom step (extension `= idl), output files: `$(DIR)/`$(TITLE)`_idl.h,&][s7; " -"`$(DIR)/`$(TITLE)`_idl.cpp, `$(DIR)/`$(TITLE).tlb&][s7; &][s7; midl /newtlb `$(!/I) " -"/h `\"`$(DIR)/`$(TITLE)`_idl.h`\" /iid&][s7; `\"`$(DIR)/`$(TITLE)`_idl.cpp`\" /tlb " -"`\"`$(DIR)/`$(TITLE).tlb`\" `\"`$(PATH)`\"&][s0; &][s0;i150;O9; 4.-|You have to define " -"a def`-file to declare public exports, like this:&][s0; &][s7; LIBRARY `\"mycontrol.ocx`\"&][s7; " -"&][s7; EXPORTS&][s7; DllCanUnloadNow PRIVATE&][s7; DllGetClassObject PRIVATE&][s7; " -"DllRegisterServer PRIVATE&][s7; DllUnregisterServer PRIVATE&][s0; &][s0;i150;O9; " -"5.-|You need to put the type library (the TLB file created by MIDL from the IDL file) " -"into your resources. Put this line on the beginning of your resource file:&][s0; " -"&][s7; 1 TYPELIB `\"mycontrol.tlb`\"&][s0; &][s0; Do not forget to manually add `\"mycontrol.tlb`\" " -"to the list of the resource file`'s dependencies. Otherwise next time you change " -"the IDL file and the MIDL recompiles your TLB, TheIDE builder won`'t find out it " -"needs to rebuild the resource script.&][s0; &][s0;i150;O9; 6.-|In the application, " -"#include and use OCX`_APP`_MAIN to declare the `\"main`\" initialization " -"routine. To be honest, the initialization routine is not really called during the " -"very startup (DllMain `-> DLL`_PROCESS`_ATTACH), its invocation is postponed until " -"1st object from the library is requested from the type factory. The reason for this " -"is that too heavy initializations tend to deadlock or crash the Windows DLL loader.&][s0; " -"&][s0;i150;O9; 7.-|To make an object an OCX control, derive it from OcxControl. You " -"should also use multiple inheritance to derive it from your custom interfaces, perhaps " -"like this:&][s0; &][s7; class MyViewOcx&][s7; : public OcxControl // handles OCX " -"control client functionality&][s7; , public DispatchInterface // custom " -"control`'s interface&][s7; , public OcxConnectionPointContainer // needed only for " -"callback (aka event) interface&][s0; &][s0;i150;") -TOPIC_TEXT( -"O9; 8.-|The whole project should be demonstrated in a simple project called Ole/Ctrl/Calc.&][s0;i150;O9; " -"]") diff --git a/archive/uppsrc/Ole/util.cpp b/archive/uppsrc/Ole/util.cpp deleted file mode 100644 index eddd91201..000000000 --- a/archive/uppsrc/Ole/util.cpp +++ /dev/null @@ -1,455 +0,0 @@ -#include "Ole.h" - -#if defined(PLATFORM_WIN32) && defined(COMPILER_MSC) - -namespace Upp { - -////////////////////////////////////////////////////////////////////// -// GUID - -GUID GetCoClassGUID(const char *name, bool prog_id) -{ - OleBstr uni = String(name); - GUID guid; - Zero(guid); - if(prog_id && *name != '{') - CLSIDFromProgID(~uni, &guid); - else - CLSIDFromString(~uni, &guid); - return guid; -} - -hash_t GetHashValue(const GUID& guid) { - const dword *p = reinterpret_cast(&guid); - return CombineHash(p[0], p[1], p[2], p[3]); -} - -String Format(const GUID& guid) { - String result; - wchar_t buffer[128]; - int length; - if((length = StringFromGUID2(guid, buffer, __countof(buffer))) > 0) - result = AsString(buffer, length - 1); - return result; -} - -String CFormat(const GUID& guid) { - String value = Format("{ 0x%08x, 0x%04x, 0x%04x, { ", (int)guid.Data1, (int)guid.Data2, (int)guid.Data3); - for(int i = 0; i < 8; i++) - value << Format("0x%02x, ", guid.Data4[i]); - return value << "} }"; -} - -String GetInterfaceName(const GUID& guid) { - if(IsNull(Guid(guid))) - return Null; - String goo = Format(guid); - return Nvl(GetWinRegString(NULL, "Interface\\" + goo, HKEY_CLASSES_ROOT), goo); -} - -String GetCoClassName(const GUID& guid) { - if(IsNull(Guid(guid))) - return Null; - String goo = Format(guid); - return Nvl(GetWinRegString(NULL, "CLSID\\" + goo + "\\ProgID", HKEY_CLASSES_ROOT), goo); -} - -String GetDisplayName(const GUID& guid) { - if(IsNull(Guid(guid))) - return Null; - String goo = Format(guid); - return Nvl(GetWinRegString(NULL, "CLSID\\" + goo, HKEY_CLASSES_ROOT), goo); -} - -bool Guid::IsNullInstance() const -{ - const dword *p = reinterpret_cast(&guid); - return (p[0] | p[1] | p[2] | p[3]) == 0; -} - - -////////////////////////////////////////////////////////////////////// -// VARIANT - -Value AsValue(const VARIANT& variant) -{ - switch(variant.vt) { - case VT_ERROR: return ErrorValue(GetErrorMessage(variant.scode)); - case VT_EMPTY: return Value(); // void - case VT_NULL: return Null; - - case VT_BOOL: - case VT_UI1: return (int)variant.bVal; - case VT_I2: return (int)variant.iVal; - case VT_I4: return (int)variant.lVal; - - case VT_R4: return variant.fltVal; - case VT_R8: return variant.dblVal; - - case VT_CY: return GetCurrency(variant.cyVal); - - case VT_DATE: return FromDATE(variant.date); - - case VT_BSTR: return BSTRToWString(variant.bstrVal); - - case VT_DECIMAL: { - const DECIMAL& d = variant.decVal; - double h = (d.Lo32 + d.Mid32 * (65536.0 * 65536.0)) * pow(0.1, d.scale); - return d.sign ? -h : h; - } - - case VT_ARRAY | VT_UI1: { - int nelem = variant.parray->rgsabound[0].cElements; - void *bits = 0; - if(SUCCEEDED(SafeArrayAccessData(variant.parray, &bits)) && bits) { - String out((const char *)bits, nelem); - SafeArrayUnaccessData(variant.parray); - return out; - } - break; - } - } - return ErrorValue(Format("Unknown variant type %d", variant.vt)); -} - -OleVariant AsVariant(Value value) { - OleVariant out(VT_NULL); - if(value.IsNull()) - return out; - switch(value.GetType()) { - case BOOL_V: out.vt = VT_UI1; out.bVal = (byte)(int)value; break; - case INT_V: out.vt = VT_I4; out.lVal = (int)value; break; - case DOUBLE_V: out.vt = VT_R8; out.dblVal = value; break; - case STRING_V: out.vt = VT_BSTR; out.bstrVal = StringToBSTR(value); break; - case WSTRING_V: out.vt = VT_BSTR; out.bstrVal = WStringToBSTR(value); break; - case DATE_V: - case TIME_V: out.vt = VT_DATE; out.date = ToDATE((Time)value); - // todo: VALUEARRAY_V ?? - default: break; - } - return out; -} - -double GetCurrency(const win32_CY_& currency) { - return (currency.Hi * (65536.0 * 65536.0) + currency.Lo) / 10000.0; -} - -OleVariant ValueToVariant(Value v) -{ - if(IsTypeRaw< IRef >(v)) - { - OleVariant out(VT_DISPATCH); - IRef disp = ValueTo< IRef >(v); - if(!!disp) disp -> AddRef(); - out.pdispVal = ~disp; - return out; - } - if(IsTypeRaw< IRef >(v)) - { - OleVariant out(VT_UNKNOWN); - IRef unk = ValueTo< IRef >(v); - if(!!unk) unk -> AddRef(); - out.punkVal = ~unk; - return out; - } - return AsVariant(v); -} - -void ReturnVariant(VARIANT *var, const Value& v) -{ - *var = AsVariant(v); -} - -////////////////////////////////////////////////////////////////////// -// BSTR - -String BSTRToString(BSTR bstr) -{ - int l; - if(!bstr || !(l = SysStringLen(bstr))) - return Null; - byte cs = GetDefaultCharset(); - if(cs == CHARSET_UTF8) - return ToUtf8(TWchar(bstr)); - StringBuffer out(l); - FromUnicode(out, TWchar(bstr), l, cs); - return out; -} - -BSTR StringToBSTR(String s) -{ - int len = s.GetLength(); - if(len == 0) - return NULL; - byte cs = GetDefaultCharset(); - if(cs == CHARSET_UTF8) - return WStringToBSTR(FromUtf8(s)); - BSTR bstr = SysAllocStringLen(NULL, len); - ToUnicode(TWchar(bstr), s, len, cs); - return bstr; -} - -void ReturnString(BSTR *dest, String s) -{ - if(*dest) - SysFreeString(*dest); - *dest = StringToBSTR(s); -} - -HRESULT CheckReturnString(BSTR *bstr, String s) -{ - if(!bstr) return E_INVALIDARG; - ReturnString(bstr, s); - return S_OK; -} - -void ReturnWString(BSTR *dest, WString s) -{ - if(*dest) - SysFreeString(*dest); - *dest = WStringToBSTR(s); -} - -HRESULT CheckReturnWString(BSTR *bstr, WString s) -{ - if(!bstr) return E_INVALIDARG; - ReturnWString(bstr, s); - return S_OK; -} - -static ValueArray SAFEARRAYToValueArrayPart(SAFEARRAY *array, long *indices, int dim_index) -{ - Vector dim_array; - int nelem = array->rgsabound[dim_index].cElements; - dim_array.SetCount(nelem); - for(int e = 0; e < nelem; e++) { - indices[dim_index] = e; - if(dim_index > 0) - dim_array[e] = SAFEARRAYToValueArrayPart(array, indices, dim_index - 1); - else { - OleVariant var; - HRESULT hr = SafeArrayGetElement(array, indices, &var); - if(SUCCEEDED(hr)) - dim_array[e] = AsValue(var); - else { - String dims; - for(int i = 0; i < dim_index; i++) - dims << (i ? ", " : "") << indices[i]; - dim_array[e] = ErrorValue(NFormat("SafeArrayGetElement(%s): error %08lx", dims, hr)); - } - } - } - return ValueArray(pick(dim_array)); -} - -ValueArray SAFEARRAYToValueArray(SAFEARRAY *array) -{ - int ndims = array->cDims; - Vector indices; - indices.SetCount(ndims, -1); - return SAFEARRAYToValueArrayPart(array, indices.Begin(), ndims - 1); -} - -Vector SAFEARRAYToWStringVector(SAFEARRAY *array) -{ - Vector out; - out.SetCount(array->rgsabound[0].cElements); - Vector indices; - indices.SetCount(array->cDims, 0); - for(int i = 0; i < out.GetCount(); i++) { - OleBstr s; - indices[0] = i; - HRESULT hr = SafeArrayGetElement(array, indices.Begin(), s.Set()); - out[i] = s; - } - return out; -} - -SAFEARRAY *ToSAFEARRAY(const ValueArray& varray) -{ - SAFEARRAY *a = SafeArrayCreateVector(VT_VARIANT, 0, varray.GetCount()); - if(!a) - return NULL; - for(long index = 0; index < varray.GetCount(); index++) { - OleVariant var = AsVariant(varray[(int)index]); - SafeArrayPutElement(a, &index, &var); - } - return a; -} - -SAFEARRAY *ToSAFEARRAY(const Vector& vstr) -{ - SAFEARRAY *a = SafeArrayCreateVector(VT_BSTR, 0, vstr.GetCount()); - if(!a) - return NULL; - for(long index = 0; index < vstr.GetCount(); index++) { - OleBstr var = vstr[(int)index]; - SafeArrayPutElement(a, &index, ~var); - } - return a; -} - -////////////////////////////////////////////////////////////////////// -// special types - -Color PackColor(long rgb) -{ - if(rgb < 0) - return Null; - return Color((rgb >> 16) & 255, (rgb >> 8) & 255, (rgb >> 0) & 255); -} - -long UnpackColor(Color c) -{ - if(IsNull(c)) - return -1; - return (c.GetR() << 16) | (c.GetG() << 8) | (c.GetB() << 0); -} - -HRESULT CheckReturnColor(long *ptr, Color c) -{ - if(!ptr) - return E_INVALIDARG; - *ptr = UnpackColor(c); - return S_OK; -} - -////////////////////////////////////////////////////////////////////// -// errors - -OleExc::OleExc(HRESULT hresult) -: Exc(NFormat("COM[%08x]: %s", (int)hresult, GetErrorMessage(hresult))) -, hresult(hresult) -{ -} - -OleExc::OleExc(HRESULT hresult, const char *text) -: Exc(NFormat("COM[%08x]: %s: %s", (int)hresult, GetErrorMessage(hresult), text)) -, hresult(hresult) -{ - LOG("OleExc::OleExc " << *this); -} - -HRESULT LogResult(HRESULT hr) -{ - LOGF("<= return 0x%08x: %s\r\n", hr, GetErrorMessage(hr)); - return hr; -} - -HRESULT LogError(HRESULT hr) -{ - if(FAILED(hr)) - LogResult(hr); - return hr; -} - -////////////////////////////////////////////////////////////////////// -// interfaces - -Value DispatchToValue(IDispatch *disp) -{ - return RawPickToValue(IRef(disp)); -} - -Value UnknownToValue(IUnknown *unk) -{ - return RawPickToValue(IRef(unk)); -} - -////////////////////////////////////////////////////////////////////// -// OleStream:: - -OleStream::OleStream(IUnknown *stream) -{ - Open(stream); -} - -bool OleStream::Open(IUnknown *stream) -{ - Close(); - if(!stream) - return false; - if(FAILED(stream -> QueryInterface(IID_IStream, (void **)&istream))) - return false; - STATSTG stat; - Zero(stat); -// HRESULT statres = istream -> Stat(&stat, STATFLAG_NONAME); - int mode = READWRITE; -// if(SUCCEEDED(statres) && (stat.grfMode & (STGM_READ | STGM_WRITE | STGM_READWRITE)) == STGM_READ) -// mode = READ; - - ULARGE_INTEGER pos = AsULarge(0), len; - HRESULT hr; - if(FAILED(hr = istream -> Seek(AsLarge(0), STREAM_SEEK_CUR, &pos)) - || FAILED(hr = istream -> Seek(AsLarge(0), STREAM_SEEK_END, &len))) - SetError(hr); - current_offset = len.QuadPart; - OpenInit(mode, len.QuadPart); - Seek(pos.QuadPart); - return true; -} - -void OleStream::Close() -{ - if(!(bool)istream) - return; - int64 pos = GetPos(); - Flush(); - HRESULT hr; - if(FAILED(hr = istream -> Seek(AsLarge(pos), STREAM_SEEK_SET, 0))) - SetError(hr); - istream = 0; -} - -void OleStream::SetStreamSize(dword size) -{ - ASSERT((bool)istream && (GetStyle() & STRM_WRITE)); - HRESULT hr; - if(FAILED(hr = istream -> SetSize(AsULarge(size)))) - SetError(hr); - ULARGE_INTEGER pos = AsULarge(0); - if(FAILED(hr = istream -> Seek(AsLarge(0), STREAM_SEEK_CUR, &pos))) - SetError(hr); - current_offset = pos.LowPart; -} - -dword OleStream::Read(int64 at, void *ptr, dword size) -{ - ASSERT((bool)istream && (GetStyle() & STRM_READ)); - RawSeek(at); - dword done = 0; - HRESULT hr; - if(FAILED(hr = istream -> Read(ptr, size, &done))) - SetError(hr); - else - current_offset += done; - return done; -} - -void OleStream::Write(int64 at, const void *data, dword size) -{ - ASSERT((bool)istream && (GetStyle() & STRM_WRITE)); - RawSeek(at); - dword done = 0; - HRESULT hr; - if(FAILED(hr = istream -> Write(data, size, &done)) || done != size) - SetError(hr); - current_offset += done; -} - -void OleStream::RawSeek(int64 pos) -{ - if(current_offset == pos) - return; - ULARGE_INTEGER new_pos = AsULarge(pos); - HRESULT hr; - if(FAILED(hr = istream -> Seek(AsLarge(pos), STREAM_SEEK_SET, &new_pos))) - SetError(hr); - pos = new_pos.LowPart; -} - -////////////////////////////////////////////////////////////////////// - -} - -#endif diff --git a/archive/uppsrc/Ole/util.h b/archive/uppsrc/Ole/util.h deleted file mode 100644 index 73271ef96..000000000 --- a/archive/uppsrc/Ole/util.h +++ /dev/null @@ -1,327 +0,0 @@ -#if defined(PLATFORM_WIN32) && defined(COMPILER_MSC) - -namespace Upp { - -#ifdef COMPILER_MSC -typedef __int64 longlong_t; -#define LL_(x) COMBINE(x, i64) -#else -typedef long long longlong_t; -#define LL_(x) COMBINE(x, LL) -#endif//COMPILER - -inline void OleInit() { CoInitialize(NULL); } - -inline const wchar_t *WcharT(const wchar *w) { return (const wchar_t *)w; } -inline wchar_t *WcharT(wchar *w) { return (wchar_t *)w; } -inline const wchar *TWchar(const wchar_t *w) { return (const wchar *)w; } -inline wchar *TWchar(wchar_t *w) { return (wchar *)w; } - -template -class OleBuffer -{ -public: - OleBuffer(T *ptr = 0) : ptr(ptr) {} - ~OleBuffer() { Clear(); } - - void Clear() { if(ptr) { CoTaskMemFree(ptr); ptr = 0; } } - T **Set() { Clear(); return &ptr; } - - operator T * () { return ptr; } - operator const T * () const { return ptr; } - -private: - T *ptr; -}; - -hash_t GetHashValue(const GUID& guid); -String Format(const GUID& guid); -String CFormat(const GUID& guid); -inline void Serialize(Stream& stream, GUID& guid) { stream.SerializeRaw((byte *)&guid, sizeof(GUID)); } -String GetInterfaceName(const GUID& guid); -String GetCoClassName(const GUID& guid); -String GetDisplayName(const GUID& guid); -GUID GetCoClassGUID(const char *name, bool prog_id = true); - -class Guid : public ValueType > -{ -public: - Guid(const Nuller& = Null) { Clear(); } - Guid(const char *text, bool prid = true) { guid = GetCoClassGUID(text, prid); } - Guid(const GUID& guid_) : guid(guid_) {} - Guid(const Guid& guid_) : guid(guid_.guid) {} - Guid(IDispatchPtr& dispatch); // dynamic GUID of a dispatch object - Guid(Value v) { *this = ValueTo(v); } - - operator Value () const { return RichValue(*this); } - operator const GUID& () const { return guid; } - operator GUID& () { return guid; } - const GUID& operator ~() const { return guid; } - - Guid& operator = (const GUID& _guid) { guid = _guid; return *this; } - - bool IsNullInstance() const; - bool IsEmpty() const { return IsNullInstance(); } - void Clear() { Zero(guid); } - - operator String () const { return UPP::Format(guid); } - String CFormat() const { return UPP::CFormat(guid); } - - void Serialize(Stream& stream) { UPP::Serialize(stream, guid); } - -private: - GUID guid; -}; - -template <> -inline hash_t GetHashValue(const Guid& guid) { return GetHashValue(~guid); } -template <> -inline String AsString(const GUID& guid) { return Format(guid); } -template <> -inline String AsString(const Guid& guid) { return Format(~guid); } - -inline bool operator == (const Guid& a, const Guid& b) { return ~a == ~b; } -inline bool operator != (const Guid& a, const Guid& b) { return ~a != ~b; } - -class OleExc : public Exc -{ -public: - OleExc(HRESULT hresult); - OleExc(HRESULT hresult, const char *text); - -public: - HRESULT hresult; -}; - -HRESULT LogResult(HRESULT hr); -HRESULT LogError(HRESULT hr); - -inline void OleVerify(HRESULT hr) { if(FAILED(hr)) throw OleExc(hr); } -inline void OleVerify(HRESULT hr, const char *text) { if(FAILED(hr)) throw OleExc(hr, text); } - -#define OLE_VERIFY(c) OleVerify(c, #c) - -class OleVariant : public VARIANT -{ -public: - OleVariant(int vtype = VT_EMPTY) { VariantInit(this); vt = vtype; } - OleVariant(const OleVariant& o) { VariantInit(this); VariantCopy(this, const_cast(&o)); } - ~OleVariant() { VariantClear(this); } - OleVariant(const VARIANT& var) { VariantInit(this); VariantCopy(this, const_cast(&var)); } - - OleVariant& operator = (const OleVariant& var) { if(this != &var) { VariantClear(this); VariantCopy(this, const_cast((VARIANT *)&var)); } return *this; } - - VARIANT operator ~ () const { VARIANT v; VariantInit(&v); VariantCopy(&v, const_cast(this)); return v; } -}; - -Value AsValue(const VARIANT& variant); -OleVariant AsVariant(Value value); - -//inline ULARGE_INTEGER AsULarge(dword value) { ULARGE_INTEGER i; i.QuadPart = value; return i; } -//inline LARGE_INTEGER AsLarge(int value) { LARGE_INTEGER i; i.QuadPart = value; return i; } -inline ULARGE_INTEGER AsULarge(int64 value) { ULARGE_INTEGER i; i.QuadPart = value; return i; } -inline LARGE_INTEGER AsLarge(int64 value) { LARGE_INTEGER i; i.QuadPart = value; return i; } - -double GetCurrency(const win32_CY_& currency); -inline DATE ToDATE(Date date) { return date - Date(1899, 12, 30); } -inline DATE ToDATE(Time time) { return (time - Time(1899, 12, 30)) / 86400.0; } -inline Time FromDATE(DATE date) { return Time(1899, 12, 30) + (int64)floor(date * 86400.0 + 0.5); } - -OleVariant ValueToVariant(Value v); -void ReturnVariant(VARIANT *var, Value v); - -inline WString BSTRToWString(BSTR bstr) { return WString((wchar *)bstr, SysStringLen(bstr)); } -inline BSTR WStringToBSTR(WString w) { return SysAllocStringLen((BSTR)~w, w.GetLength()); } -String BSTRToString(BSTR bstr); -BSTR StringToBSTR(String s); - -void ReturnString(BSTR *dest, String s); -HRESULT CheckReturnString(BSTR *bstr, String s); -void ReturnWString(BSTR *dest, WString s); -HRESULT CheckReturnWString(BSTR *bstr, WString s); - -ValueArray SAFEARRAYToValueArray(SAFEARRAY *array); -Vector SAFEARRAYToWStringVector(SAFEARRAY *array); -SAFEARRAY *ToSAFEARRAY(const ValueArray& varray); -SAFEARRAY *ToSAFEARRAY(const Vector& varray); -void ReturnSAFEARRAY(SAFEARRAY *dest, const ValueArray& array); -void ReturnSAFEARRAY(SAFEARRAY *dest, const Vector& array); -HRESULT CheckReturnSAFEARRAY(SAFEARRAY *dest, const ValueArray& array); -HRESULT CheckReturnSAFEARRAY(SAFEARRAY *dest, const Vector& array); - -class OleSafeArray { -public: - OleSafeArray() : array(NULL) {} - OleSafeArray(const ValueArray& va) { array = ToSAFEARRAY(va); } - OleSafeArray(const Vector& vs) { array = ToSAFEARRAY(vs); } - OleSafeArray(const OleSafeArray& a) { array = NULL; if(a.array) OleVerify(SafeArrayCopy(a.array, &array)); } - ~OleSafeArray() { if(array) SafeArrayDestroy(array); } - - operator ValueArray () const { return SAFEARRAYToValueArray(array); } - operator Vector () const { return SAFEARRAYToWStringVector(array); } - SAFEARRAY *operator ~ () const { return array; } - -private: - SAFEARRAY *array; -}; - -class OleBstr -{ -public: - OleBstr(const Nuller& = Null) : bstr(NULL) {} - OleBstr(WString w) : bstr(WStringToBSTR(w)) {} - OleBstr(String s) : bstr(StringToBSTR(s)) {} - ~OleBstr() { if(bstr) SysFreeString(bstr); } - - void Clear() { if(bstr) { SysFreeString(bstr); bstr = NULL; } } - BSTR *Set() { Clear(); return &bstr; } - - operator WString () const { return BSTRToWString(bstr); } - operator String () const { return BSTRToString(bstr); } - String ToString() const { return BSTRToString(bstr); } -// operator BSTR () const { return bstr; } - BSTR operator ~ () const { return bstr; } - int GetLength() const { return SysStringLen(bstr); } - -private: - BSTR bstr; -}; - -inline const RECTL& ToRectL(const Rect& rc) { return reinterpret_cast(rc); } -inline const Rect& ToRect(const RECTL& rc) { return reinterpret_cast(rc); } - -Color PackColor(long rgb); -long UnpackColor(Color c); -HRESULT CheckReturnColor(long *ptr, Color c); - -template -class IRefBase : Moveable< IRefBase > -{ -public: - IRefBase(T *ptr = NULL) : ptr(ptr) { if(ptr) ptr->AddRef(); } - IRefBase(const IRefBase& i) { if(ptr = i.ptr) ptr->AddRef(); } - ~IRefBase() { if(ptr) ptr->Release(); } - - static GUID GetIID() { return __uuidof(T); } - - HRESULT Create(const GUID& clsid, dword flags = CLSCTX_INPROC_SERVER) - { return CoCreateInstance(clsid, NULL, flags, GetIID(), (void **)Set()); } - - void Clear() { if(ptr) { ptr->Release(); ptr = 0; } } - - T *operator->() const { ASSERT(ptr); return ptr; } - T& operator * () const { ASSERT(ptr); return *ptr; } - T *operator ~ () const { return ptr; } - - T **Set() { Clear(); return &ptr; } - IUnknown **SetUnk() { Clear(); return (IUnknown **)&ptr; } - void **SetVoid() { Clear(); return (void **)&ptr; } - void Set(T *p) { T *old = ptr; if(ptr = p) ptr->AddRef(); if(old) old->Release(); } - - bool operator !() const { return !ptr; } - - T *AddRef() { if(ptr) ptr->AddRef(); return ptr; } - T *Detach() { T *out = ptr; ptr = 0; return out; } - T *operator - () { return Detach(); } - -protected: - mutable T *ptr; -}; - -template -class IRef : public Moveable< IRef, IRefBase > -{ -public: - IRef() {} - IRef(IUnknown *u) { if(u) OleVerify(u->QueryInterface(__uuidof(T), (void **)&ptr)); } - IRef(T *t) { if(ptr = t) ptr->AddRef(); } - IRef(const GUID& clsid, dword flags = CLSCTX_INPROC_SERVER) { OleVerify(Create(clsid, flags)); } - IRef(const IRef& x) : Moveable< IRef, IRefBase >(x) {} - explicit IRef(const VARIANT& v) - { - ptr = NULL; - if(v.vt == VT_DISPATCH) - OleVerify(v.pdispVal->QueryInterface(__uuidof(T), (void **)&ptr)); - else if(v.vt == VT_UNKNOWN) - OleVerify(v.punkVal->QueryInterface(__uuidof(T), (void **)&ptr)); - else - { - ASSERT(v.vt == VT_EMPTY || v.vt == VT_NULL); - } - } - - IRef& operator = (const IRef& x) { Set(x.ptr); return *this; } -}; - -template <> -class IRef : public IRefBase -{ -public: - IRef() {} - IRef(IUnknown *u) : IRefBase(u) {} - IRef(const GUID& clsid, dword flags = CLSCTX_INPROC_SERVER) { OleVerify(Create(clsid, flags)); } - IRef(const IRef& x) : IRefBase(x.ptr) {} - - IRef& operator = (const IRef& x) { Set(x.ptr); return *this; } -}; - -Value DispatchToValue(IDispatch *disp); -Value UnknownToValue(IUnknown *unk); - -template -OleVariant DispVar(I& iface) -{ - IRef disp = iface; - OleVariant out(VT_DISPATCH); - if(!!disp) disp->AddRef(); - out.pdispVal = ~disp; - return out; -} - -template -struct OleType : Moveable< OleType > -{ - friend T *Ptr(T& t) { return reinterpret_cast(&reinterpret_cast(t)); } - friend T& Deref(T *t) { return reinterpret_cast(*reinterpret_cast(t)); } - friend void Destroy(T& t) { t.~T(); } - friend T& Construct(T& t) { return Deref(new(Ptr(t)) T); } - friend void CopyConstruct(T& t, T& x) { new(Ptr(t)) T(x); } - friend void DeepCopyConstruct(T& t, const T& x) { new(Ptr(t)) T(x); } -}; - -template -inline HRESULT QueryInterface(T& src, U& dest, const GUID& guid) -{ - return src->QueryInterface(guid, (void **)dest.Set()); -} - -template -inline HRESULT QueryInterface(T& src, U& dest) -{ - return QueryInterface(src, dest, dest.GetIID()); -} - -class OleStream : public BlockStream -{ -public: - OleStream(IUnknown *stream = 0); - - bool Open(IUnknown *stream); - virtual void Close(); - virtual bool IsOpen() const { return istream; } - -protected: - virtual void SetStreamSize(dword size); - virtual dword Read(int64 at, void *ptr, dword size); - virtual void Write(int64 at, const void *data, dword size); - - void RawSeek(int64 pos); - -protected: - IStreamPtr istream; - int64 current_offset; -}; - -} - -#endif diff --git a/archive/uppsrc/OleDB/Copying b/archive/uppsrc/OleDB/Copying deleted file mode 100644 index 78862af24..000000000 --- a/archive/uppsrc/OleDB/Copying +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 2014, The U++ Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted -provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other materials provided - with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/archive/uppsrc/OleDB/OleDB.cpp b/archive/uppsrc/OleDB/OleDB.cpp deleted file mode 100644 index 67d710bb2..000000000 --- a/archive/uppsrc/OleDB/OleDB.cpp +++ /dev/null @@ -1,1559 +0,0 @@ -#include "OleDB.h" - -#define LLOG(x) - -#if defined(PLATFORM_WIN32) && defined(COMPILER_MSC) - -namespace Upp { - -// #define BYREF // This was not success, maybe later? - -#define LTIMING(x) // RTIMING(x) - -#ifndef CPU_64 -typedef ULONG DBLENGTH; -typedef LONG DBROWCOUNT; -#endif - -typedef Value (*OutBindProc)(const DBBINDING& binding, const byte *data); -typedef void (*InBindProc)(const DBBINDING& binding, byte *data, const Value& value); - -static WString GetErrorText(IRef err) -{ - OleBstr bstr; - WString errtext; - if(SUCCEEDED(err->GetDescription(bstr.Set()))) - errtext = bstr; - if(SUCCEEDED(err->GetSource(bstr.Set()))) - errtext << " (" << WString(bstr) << ")"; - return errtext; -} - -WString OleDBErrorInfo(HRESULT hr) -{ - IRef err; - WString errtext; - if(GetErrorInfo(0, err.Set()) == S_OK && !!err) { - IRef recerr; - if(SUCCEEDED(QueryInterface(err, recerr)) && !!recerr) { - ULONG nrec = 0; - if(SUCCEEDED(recerr->GetRecordCount(&nrec))) - for(int i = nrec; --i >= 0;) { - IRef suberr; - if(SUCCEEDED(recerr->GetErrorInfo(i, GetUserDefaultLCID(), suberr.Set())) && !!suberr) { - if(!IsNull(errtext)) - errtext << '\n'; - IRef sqlerr; - if(SUCCEEDED(recerr->GetCustomErrorObject(i, IID_ISQLErrorInfo, sqlerr.SetUnk())) && !!sqlerr) { - OleBstr state; - long error; - if(SUCCEEDED(sqlerr->GetSQLInfo(state.Set(), &error))) - errtext << NFormat("%s(%d): ", String(state), error).ToWString(); - } - errtext << GetErrorText(suberr); - } - } - } - else - errtext = GetErrorText(err); - } - else - errtext = NFormat("OleDB(%08x): neznámá chyba", hr).ToWString(); - return errtext; -} - -void OleDBVerify(HRESULT hr) -{ - if(SUCCEEDED(hr)) - return; - throw OleExc(hr, OleDBErrorInfo(hr).ToString()); -} - -const char *OleDBParseString(const char *s) -{ - ASSERT(*s == '\''); - s++; - while(*s) - if(*s++ == '\'' && *s++ != '\'') - return s - 1; - return NULL; -} - -String OleDBParseStringError(const char *s) -{ - String err = "Parse error: unterminated string "; - int l = (int)strlen(s); - enum { SAMPLE = 10 }; - if(l <= SAMPLE) - err.Cat(s, l); - else { - err.Cat(s, SAMPLE); - err.Cat("..."); - } - return err; -} - -/* -String OleDBParseRefError(const char *s) -{ - return NFormat("Parse error: invalid ?%% type specifier '%c'", *s); -} -*/ - -int OleDBParse(const char *statement, String& out, OleDBConnection *conn, OleDBSession *session) -{ - String cmd; - int args = 0; - const char *s = statement; - while(*s) { - if(*s == '\'') { - const char *b = s; - s = OleDBParseString(b); - if(!s) { - if(session) - session->SetError(OleDBParseStringError(b), statement); - return -1; - } - cmd.Cat(b, int(s - b)); - } - else if(*s == '?') { - ++s; - ++args; - cmd.Cat('?'); -/* - if(*s == '%') { - OracleRef oraref; - const char *p = s + 1; - s = oraref.Parse(p); - if(!s) { - if(session) - session->SetError(String() << "Parse error: invalid ?% type specifier '" - << *p << "'", statement); - return -1; - } - conn->SetParam(args - 1, oraref); - } -*/ - } - else - cmd.Cat(*s++); - } - out = cmd; - return args; -} - -static void DBInEmpty(const DBBINDING& binding, byte *data, const Value& v) -{ -} - -static void DBInInt(const DBBINDING& binding, byte *data, const Value& v) -{ - *(int *)(data + binding.obValue) = v; -} - -static void DBInDouble(const DBBINDING& binding, byte *data, const Value& v) -{ - *(double *)(data + binding.obValue) = v; -} - -static void DBInString(const DBBINDING& binding, byte *data, const Value& v) -{ - String s; - if(IsString(v)) - s = v; - else if(IsTypeRaw(v)) - s = ValueTo(v); - int l = s.GetLength(); - ASSERT(binding.cbMaxLen >= l + 1u); - memcpy(data + binding.obValue, s, l + 1); - *(DBLENGTH *)(data + binding.obLength) = l; -} - -static void DBInWString(const DBBINDING& binding, byte *data, const Value& v) -{ - WString s(v); - int l = s.GetLength(); - ASSERT(binding.cbMaxLen >= sizeof(wchar) * (l + 1)); - memcpy(data + binding.obValue, s, sizeof(wchar) * (l + 1)); - *(DBLENGTH *)(data + binding.obLength) = 2 * l; -} - -static void DBInTime(const DBBINDING& binding, byte *data, const Value& v) -{ - *(DATE *)(data + binding.obValue) = ToDATE(Time(v)); -} - -static Value DBOutInt(const DBBINDING& binding, const byte *data) -{ - return *(const int *)(data + binding.obValue); -} - -static Value DBOutBool(const DBBINDING& binding, const byte *data) -{ - return *(const byte *)(data + binding.obValue) & 1; -} - -static Value DBOutI8(const DBBINDING& binding, const byte *data) -{ - return (double)*(const longlong_t *)(data + binding.obValue); -} - -static Value DBOutDouble(const DBBINDING& binding, const byte *data) -{ - return *(const double *)(data + binding.obValue); -} - -#ifdef BYREF -static Value DBOutString(const DBBINDING& binding, const byte *data) -{ - return String(*(char **)(data + binding.obValue), *(const DBLENGTH *)(data + binding.obLength)); -} - -static Value DBOutWString(const DBBINDING& binding, const byte *data) -{ - return WString(*(const wchar **)(data + binding.obValue), *(const DBLENGTH *)(data + binding.obLength) >> 1); -} -#else -static Value DBOutString(const DBBINDING& binding, const byte *data) -{ - return String(data + binding.obValue, (int)*(const DBLENGTH *)(data + binding.obLength)); -} - -static Value DBOutWString(const DBBINDING& binding, const byte *data) -{ - return WString((const wchar *)(data + binding.obValue), (int)*(const DBLENGTH *)(data + binding.obLength) >> 1); -} -#endif - -static Value DBOutTime(const DBBINDING& binding, const byte *data) -{ - return FromDATE(*(const DATE *)(data + binding.obValue)); -} - -static Value DBOutBytes(const DBBINDING& binding, const byte *data) -{ - StringBuffer r; - HRESULT hr; - static const int CHUNK = 65536; - Buffer pbBuff(CHUNK); - ISequentialStream *pISequentialStream = *((ISequentialStream **)(data + binding.obValue)); - for(;;) { - ULONG cbNeeded = CHUNK; - ULONG cbRead = 0; - hr = pISequentialStream->Read(pbBuff, cbNeeded, &cbRead); - if(FAILED(hr)) - return ErrorValue(OleExc(hr)); - if(hr == S_FALSE || cbRead == 0) - break; - r.Cat((const char*)~pbBuff, (int)cbRead); - } - pISequentialStream->Release(); - return (String)r; -} - -/* -static Value DBOutGuid(const DBBINDING& binding, const byte *data) -{ - return *(const Guid *)(data + binding.obValue); -} -*/ - -NTL_MOVEABLE(DBBINDING) - -struct BindingPart { - BindingPart() : rowbytes(0), haccessor(0) {} - - void GetRowData(Vector& out) const; - - Vector colindex; - Vector bindings; - Vector colnames; - int rowbytes; - Vector bindproc; - Array objects; - HACCESSOR haccessor; - Buffer rowbuffer; -}; - -void BindingPart::GetRowData(Vector& out) const -{ - for(int i = 0; i < bindings.GetCount(); i++) { - const DBBINDING& dbbind = bindings[i]; - Value& op = out[colindex[i]]; - int status = *(const DBSTATUS *)(~rowbuffer + dbbind.obStatus); - switch(status) { - case DBSTATUS_S_ISNULL: { - op = Value(); - break; - } - case DBSTATUS_S_OK: { - op = bindproc[i](dbbind, ~rowbuffer); - break; - } - default: { - op = ErrorValue(NFormat("column[%d]: %d", (int)dbbind.iOrdinal, status)); - break; - } - } - } -} - -static Array GetRowDataBindings(const DBCOLUMNINFO *columns, int count) -{ - Array out_parts; - out_parts.Add(); - bool first_blob = true; - for(int i = 0; i < count; i++) { - const DBCOLUMNINFO& col = columns[i]; - int part_index = 0; - if(col.wType == DBTYPE_BYTES && (col.dwFlags & DBCOLUMNFLAGS_ISLONG)) { - if(first_blob) { - part_index = 0; - first_blob = false; - } - else { - part_index = out_parts.GetCount(); - out_parts.Add(); - } - } - BindingPart& part = out_parts[part_index]; - part.colindex.Add(i); - part.colnames.Add(WString(col.pwszName).ToString()); - DBBINDING& db = part.bindings.Add(); - OutBindProc& ob = part.bindproc.Add(); - memset(&db, 0, sizeof(db)); - db.iOrdinal = col.iOrdinal; - db.dwPart = DBPART_STATUS | DBPART_VALUE; - db.dwMemOwner = DBMEMOWNER_CLIENTOWNED; - db.eParamIO = DBPARAMIO_NOTPARAM; - db.obStatus = part.rowbytes; - part.rowbytes += sizeof(DBSTATUS); - switch(col.wType) { - case DBTYPE_I1: - case DBTYPE_I2: - case DBTYPE_I4: - case DBTYPE_UI1: - case DBTYPE_UI2: - db.wType = DBTYPE_I4; - db.obValue = part.rowbytes; - ob = &DBOutInt; - part.rowbytes += 4; - break; - - case DBTYPE_BOOL: - db.wType = DBTYPE_I1; - db.obValue = part.rowbytes; - ob = &DBOutBool; - part.rowbytes += 4; - break; - - case DBTYPE_UI4: - db.wType = DBTYPE_UI4; - db.obValue = part.rowbytes; - ob = &DBOutInt; - part.rowbytes += 4; - break; - - case DBTYPE_UI8: - case DBTYPE_I8: - part.rowbytes = (part.rowbytes + 7) & -8; - db.wType = col.wType; - db.obValue = part.rowbytes; - ob = &DBOutI8; - part.rowbytes += 8; - break; - - case DBTYPE_R4: - case DBTYPE_R8: - case DBTYPE_CY: - case DBTYPE_DECIMAL: - case DBTYPE_NUMERIC: - case DBTYPE_VARNUMERIC: - part.rowbytes = (part.rowbytes + 7) & -8; - db.wType = DBTYPE_R8; - db.obValue = part.rowbytes; - ob = &DBOutDouble; - part.rowbytes += 8; - break; - - case DBTYPE_DATE: - case DBTYPE_FILETIME: - case DBTYPE_DBDATE: - case DBTYPE_DBTIME: - case DBTYPE_DBTIMESTAMP: - part.rowbytes = (part.rowbytes + sizeof(DATE) - 1) & -(int)sizeof(DATE); - db.wType = DBTYPE_DATE; - db.obValue = part.rowbytes; - ob = &DBOutTime; - part.rowbytes += sizeof(DATE); - break; - -#ifdef BYREF - case DBTYPE_GUID: - case DBTYPE_STR: - db.wType = DBTYPE_BYREF|DBTYPE_STR; - *ob = &DBOutString; - db.cbMaxLen = col.ulColumnSize + 1; - byref: - db.obValue = rowbytes; - db.dwMemOwner = DBMEMOWNER_PROVIDEROWNED; - rowbytes += sizeof(void *); - db.obLength = rowbytes; - db.dwPart = DBPART_VALUE | DBPART_LENGTH | DBPART_STATUS; - rowbytes += sizeof(DBLENGTH); - db.cbMaxLen = sizeof(void *); - break; - - case DBTYPE_BYTES: - if(col.dwFlags & DBCOLUMNFLAGS_ISLONG) { - db.wType = DBTYPE_IUNKNOWN; - db.dwPart = DBPART_VALUE | DBPART_STATUS; - db.cbMaxLen = sizeof(ISequentialStream*); - db.pObject = &object.Add(); - db.pObject->iid = IID_ISequentialStream; - db.pObject->dwFlags = STGM_READ; - db.obValue = rowbytes; - rowbytes += sizeof(ISequentialStream*); - *ob = &DBOutBytes; - } - else { - db.wType = DBTYPE_BYREF|DBTYPE_BYTES; - *ob = &DBOutString; - db.cbMaxLen = sizeof(void *); - goto byref; - } - break; - - case DBTYPE_BSTR: - case DBTYPE_WSTR: - db.wType = DBTYPE_BYREF|DBTYPE_WSTR; - *ob = &DBOutWString; - db.cbMaxLen = sizeof(OLECHAR) * (col.ulColumnSize + 1); - goto byref; - -#else - case DBTYPE_BYTES: - if(col.dwFlags & DBCOLUMNFLAGS_ISLONG) { - db.wType = DBTYPE_IUNKNOWN; - db.cbMaxLen = sizeof(ISequentialStream*); - db.pObject = &part.objects.Add(); - db.pObject->iid = IID_ISequentialStream; - db.pObject->dwFlags = STGM_READ; - db.obValue = part.rowbytes; - part.rowbytes += sizeof(ISequentialStream*); - ob = &DBOutBytes; - } - else { - db.wType = DBTYPE_BYTES; - db.obValue = part.rowbytes; - ob = &DBOutString; - db.cbMaxLen = min(col.ulColumnSize, 10000000); - part.rowbytes += int((db.cbMaxLen + 1 + 3) & -4); - db.obLength = part.rowbytes; - db.dwPart = DBPART_VALUE | DBPART_LENGTH | DBPART_STATUS; - part.rowbytes += sizeof(DBLENGTH); - } - break; - - case DBTYPE_STR: - case DBTYPE_GUID: - db.wType = DBTYPE_STR; - db.obValue = part.rowbytes; - ob = &DBOutString; - db.cbMaxLen = min(col.ulColumnSize, 1000000) + 1; - part.rowbytes += int((db.cbMaxLen + 1 + 3) & -4); - db.obLength = part.rowbytes; - db.dwPart = DBPART_VALUE | DBPART_LENGTH | DBPART_STATUS; - part.rowbytes += sizeof(DBLENGTH); - break; - - case DBTYPE_BSTR: - case DBTYPE_WSTR: - db.wType = DBTYPE_WSTR; - db.obValue = part.rowbytes; - db.cbMaxLen = sizeof(OLECHAR) * (min(col.ulColumnSize, 1000000) + 1); - ob = &DBOutWString; - part.rowbytes += int((db.cbMaxLen + 3) & -4); - db.obLength = part.rowbytes; - db.dwPart = DBPART_VALUE | DBPART_LENGTH | DBPART_STATUS; - part.rowbytes += sizeof(DBLENGTH); - break; -#endif -/* - case DBTYPE_GUID: - rowbytes = (rowbytes + 7) & -8; - db.wType = DBTYPE_GUID; - db.obValue = rowbytes; - *ob = &DBOutGuid; - rowbytes += sizeof(GUID); - break; -*/ - default: - throw Exc(NFormat("column[%d] has invalid type %d", (int)col.iOrdinal, (int)col.wType)); - } - } - - for(int p = 0; p < out_parts.GetCount(); p++) { - BindingPart& part = out_parts[p]; - part.rowbytes = (part.rowbytes + 7) & -8; - part.rowbuffer.Alloc(part.rowbytes); - } - - return out_parts; -} - -class OleDBConnection : public Link, public SqlConnection -{ -public: - OleDBConnection(OleDBSession *session); - virtual ~OleDBConnection(); - - void Clear(); - - virtual void SetParam(int i, const Value& r); - virtual bool Execute(); - virtual int GetRowsProcessed() const; - virtual bool Fetch(); - virtual void GetColumn(int i, Ref r) const; - virtual void Cancel(); - virtual SqlSession& GetSession() const { ASSERT(session); return *session; } - virtual String GetUser() const { ASSERT(session); return session->user; } - virtual String ToString() const; - virtual Value GetInsertedId() const; - - void Execute(IRef rowset); - -private: - bool TryExecute(); - void TryPrefetch(); - void ClearArgs(); - void SyncArgs(); - -private: - OleDBSession *session; - - struct Param { - Param() : vtype(VOID_V), alloc(0), bindproc(&DBInEmpty) {} - - int vtype; - int alloc; - Value value; - InBindProc bindproc; - }; - - IRef cmd; - IRef cmd_text; - IRef cmd_prepare; - IRef cmd_accessor; - HACCESSOR cmd_haccessor; - Array cmd_param; - Buffer cmd_bindings; - Buffer cmd_argbuffer; - - IRef fetch_rowset; - IRef fetch_accessor; - HACCESSOR fetch_haccessor; - Array fetch_bindings; -// Buffer fetch_bindprocs; -// Buffer fetch_bindings; -// Buffer fetch_rowbuffer; - Buffer fetch_hrows; - int fetch_rowbytes; - int fetch_chunk; - Vector< Vector > prefetch; - Vector current_row; - DBROWCOUNT fetch_rowcount; - bool fetch_eof; - String last_insert_table; - Array object; - - enum { - MAX_FETCH_ROWS = 100, - MAX_FETCH_BYTES = 100000, - }; -}; - -OleDBConnection::OleDBConnection(OleDBSession *session_) -: session(session_) -{ - if(session) - LinkAfter(&session->clink); - fetch_haccessor = 0; - cmd_haccessor = 0; -} - -OleDBConnection::~OleDBConnection() -{ - if(session) - Unlink(); -} - -Value OleDBConnection::GetInsertedId() const -{ - Sql sql(GetSession()); - return last_insert_table.GetCount() ? sql.Select("IDENT_CURRENT('" + last_insert_table + "')") - : sql.Select("@@IDENTITY"); -} - -void OleDBConnection::Clear() -{ - Cancel(); - cmd_param.Clear(); - cmd.Clear(); - cmd_text.Clear(); - cmd_prepare.Clear(); - cmd_accessor.Clear(); -// ClearArgs(); -// cmd_param.Clear(); -// fetch_rowset.Clear(); -// cmd.Clear(); -// cmd_text.Clear(); -// cmd_prepare.Clear(); -// cmd_accessor.Clear(); - session = NULL; -} - -void OleDBConnection::SetParam(int i, const Value& r) -{ - if(i >= cmd_param.GetCount()) - ClearArgs(); - Param& par = cmd_param.At(i); - par.value = r; - if(IsNull(r)) { - if(cmd_haccessor) - *(dword *)(cmd_argbuffer + cmd_bindings[i].obStatus) = DBSTATUS_S_ISNULL; - } - else { - int l; - switch(r.GetType()) { - case BOOL_V: - case INT_V: - if(par.vtype != INT_V && par.vtype != DOUBLE_V) { - ClearArgs(); - par.vtype = INT_V; - par.bindproc = &DBInInt; - } - break; - - case DOUBLE_V: - if(par.vtype != DOUBLE_V) { - ClearArgs(); - par.vtype = DOUBLE_V; - par.bindproc = &DBInDouble; - } - break; - - case SQLRAW_V: - l = String(SqlRaw(r)).GetLength(); - if(par.vtype != SQLRAW_V || par.alloc < l) { - ClearArgs(); - par.vtype = SQLRAW_V; - par.alloc = max(2 * l, 32); - par.bindproc = &DBInString; - } - break; - - case STRING_V: - l = String(r).GetLength(); - if(par.vtype != STRING_V && par.vtype != WSTRING_V || par.alloc < l) { - ClearArgs(); - par.vtype = STRING_V; - par.alloc = max(2 * l, 32); - par.bindproc = &DBInString; - } - break; - - case WSTRING_V: - l = WString(r).GetLength(); - if(par.vtype != WSTRING_V || par.alloc < l) { - ClearArgs(); - par.vtype = WSTRING_V; - par.alloc = max(2 * l, 32); - par.bindproc = &DBInWString; - } - break; - - case DATE_V: - case TIME_V: - if(par.vtype != TIME_V) { - ClearArgs(); - par.vtype = TIME_V; - par.bindproc = &DBInTime; - } - break; - - default: - NEVER(); - break; - } - if(cmd_haccessor) { - const DBBINDING& binding = cmd_bindings[i]; - *(dword *)(cmd_argbuffer + binding.obStatus) = DBSTATUS_S_OK; - par.bindproc(binding, cmd_argbuffer, r); - } - } -} - -bool OleDBConnection::Execute() -{ - try { - // There seems to be a problem in MSSQL with "select @@IDENTITY" nested in another select - // "select IDENTITIY_CURRENT('tablename') works, thus this ugly workaround - last_insert_table.Clear(); - CParser p(statement); - if((p.Id("insert") || p.Id("INSERT")) && (p.Id("into") || p.Id("INTO")) && p.IsId()) - last_insert_table = p.ReadId(); - return TryExecute(); - } - catch(Exc e) { - if(session) - session->SetError("Execute(OleDB): " + e, statement); - Cancel(); - cmd.Clear(); - return false; - } -} - -bool OleDBConnection::TryExecute() -{ -// session->PreExec(); -// if(t) -// *t << statement << "\n"; - int args = 0; - if(!session) { - LLOG("OleDB Execute: invalid cursor (zombie state)"); - return false; // zombie state or closed session - } - if(!session->dbsession) - throw Exc("session is closed"); - if(parse) - Cancel(); - if(!cmd) { - OleDBVerify(session->dbsession->CreateCommand(NULL, cmd.GetIID(), cmd.SetUnk())); - OleDBVerify(QueryInterface(cmd, cmd_text)); - OleDBVerify(QueryInterface(cmd, cmd_accessor)); - QueryInterface(cmd, cmd_prepare); - parse = true; - } - if(parse) { - String rawcmd; - args = OleDBParse(statement, rawcmd, this, session); - OleDBVerify(cmd_text->SetCommandText(session->dialect, ~OleBstr(rawcmd))); - if(!!cmd_prepare) - OleDBVerify(cmd_prepare->Prepare(0)); - if(cmd_param.GetCount() != args) { - ClearArgs(); - cmd_param.SetCount(args); - } - } - int time = msecs(); - DBPARAMS params; - params.pData = 0; - params.cParamSets = 0; - params.hAccessor = 0; - if(!cmd_param.IsEmpty()) { - if(!cmd_haccessor) - SyncArgs(); - params.pData = cmd_argbuffer; - params.cParamSets = 1; - params.hAccessor = cmd_haccessor; - } - IRef frowset; - OleDBVerify(cmd->Execute(NULL, frowset.GetIID(), ¶ms, &fetch_rowcount, frowset.SetUnk())); - Stream *t = session->GetTrace(); - if(t && session->IsTraceTime()) - *t << NFormat("----- %s exec %d ms:\n", ToString(), msecs(time)); - -// if(!dynamic_param.IsEmpty()) { -// dynamic_pos = -1; -// for(int i = 0; i < dynamic_param.GetCount(); i++) -// param[dynamic_param[i]].DynaFlush(); -// dynamic_rows = param[dynamic_param[0]].dynamic.GetCount(); -// } - - if(parse && !!frowset) - Execute(frowset); - else { - fetch_rowset = frowset; - fetch_rowcount = 0; - } - fetch_eof = info.IsEmpty(); -// session->PostExec(); - return true; -} - -void OleDBConnection::Execute(IRef rowset) -{ - fetch_rowset = rowset; - fetch_eof = false; - fetch_rowcount = 0; - - OleBuffer columns; - OleBuffer names; - ULONG fetchcols; - IRef cinfo(~fetch_rowset); - OleDBVerify(cinfo->GetColumnInfo((DBORDINAL *)&fetchcols, columns.Set(), names.Set())); - info.SetCount(fetchcols); - for(int i = 0; i < (int)fetchcols; i++) { - SqlColumnInfo& colinfo = info[i]; - const DBCOLUMNINFO& dbci = columns[i]; - colinfo.name = WString((const wchar *)dbci.pwszName).ToString(); - colinfo.precision = (dbci.bPrecision == (byte)~0 ? int(Null) : dbci.bPrecision); - colinfo.scale = (dbci.bScale == (byte)~0 ? int(Null) : dbci.bScale); - colinfo.width = (int)dbci.ulColumnSize; - colinfo.binary = false; - switch(dbci.wType) { - case DBTYPE_I1: case DBTYPE_I2: case DBTYPE_I4: - case DBTYPE_UI1: case DBTYPE_UI2: case DBTYPE_UI4: - case DBTYPE_BOOL: - colinfo.type = INT_V; - break; - - case DBTYPE_UI8: case DBTYPE_I8: - case DBTYPE_R4: case DBTYPE_R8: - case DBTYPE_CY: - case DBTYPE_DECIMAL: - case DBTYPE_NUMERIC: - case DBTYPE_VARNUMERIC: - colinfo.type = DOUBLE_V; - break; - - case DBTYPE_DATE: case DBTYPE_FILETIME: - case DBTYPE_DBDATE: case DBTYPE_DBTIME: - case DBTYPE_DBTIMESTAMP: - colinfo.type = TIME_V; - break; - - case DBTYPE_BYTES: - colinfo.binary = true; - colinfo.type = STRING_V; - break; - - case DBTYPE_STR: - case DBTYPE_BSTR: - case DBTYPE_WSTR: - case DBTYPE_GUID: - colinfo.type = STRING_V; - break; - - default: - colinfo.type = UNKNOWN_V; - break; - } - } - fetch_bindings = GetRowDataBindings(columns, fetchcols); - int total = 0; - for(int p = 0; p < fetch_bindings.GetCount(); p++) - total += fetch_bindings[p].rowbytes; - fetch_chunk = minmax(MAX_FETCH_BYTES / (total + 1), 1, MAX_FETCH_ROWS); -// fetch_rowbuffer.Alloc(fetch_rowbytes); - fetch_hrows.Alloc(fetch_chunk); - OleDBVerify(QueryInterface(fetch_rowset, fetch_accessor)); - for(int p = 0; p < fetch_bindings.GetCount(); p++) { - BindingPart& part = fetch_bindings[p]; - OleDBVerify(fetch_accessor->CreateAccessor(DBACCESSOR_ROWDATA, - part.bindings.GetCount(), part.bindings.Begin(), - part.rowbytes, &part.haccessor, NULL)); - } -} - -int OleDBConnection::GetRowsProcessed() const -{ - return (int)fetch_rowcount; -} - -bool OleDBConnection::Fetch() -{ - LTIMING("OleDBConnection::Fetch"); - if(fetch_eof) - return false; - ASSERT(!!fetch_rowset); - current_row.Clear(); - if(prefetch.IsEmpty()) - try { - TryPrefetch(); - if(prefetch.IsEmpty()) { - fetch_eof = true; - return false; - } - } - catch(Exc e) { - session->SetError("Fetch(OleDB): " + e, statement); - fetch_eof = true; - return false; - } - LTIMING("OleDBConnection::Fetch->scroll"); - current_row = prefetch[0]; - prefetch.Remove(0); - fetch_rowcount++; - return true; -} - -void OleDBConnection::TryPrefetch() -{ - LTIMING("OleDBConnection::TryPrefetch"); - - DBCOUNTITEM countrows; - HROW *prows = fetch_hrows; - - { - LTIMING("OleDBConnection::TryPrefetch->GetNextRows"); - HRESULT hr; - if(!fetch_rowset) { - session->SetError("Fetch(OleDB): execute failed (null rowset)", statement); - return; - } - if(FAILED(hr = fetch_rowset->GetNextRows(DB_NULL_HCHAPTER, 0, fetch_chunk, &countrows, &prows))) { - session->SetError(("Fetch(OleDB): " + OleDBErrorInfo(hr)).ToString(), statement); - return; - } - } - if(countrows <= 0) - return; - for(unsigned i = 0; i < countrows; i++) { - Vector& val = prefetch.Add(); - val.SetCount(info.GetCount()); - for(int p = 0; p < fetch_bindings.GetCount(); p++) { - BindingPart& part = fetch_bindings[p]; - LTIMING("OleDBConnection::TryPrefetch->GetData"); - try { - OleDBVerify(fetch_rowset->GetData(fetch_hrows[i], part.haccessor, part.rowbuffer)); - fetch_bindings[p].GetRowData(val); - } - catch(OleExc e) { - String col_errs; - for(int b = 0; b < part.bindings.GetCount(); b++) { - const DBBINDING& dbbind = part.bindings[b]; - int status = *(const DBSTATUS *)(~part.rowbuffer + dbbind.obStatus); - if(status != S_OK && status != DBSTATUS_S_ISNULL) { - if(!IsNull(col_errs)) - col_errs.Cat("; "); - col_errs << part.colnames[b] << ": " << OleExc(status); - } - } - throw OleExc(e.hresult, col_errs); - } - } - } - LTIMING("OleDBConnection::TryPrefetch->ReleaseRows"); - OleDBVerify(fetch_rowset->ReleaseRows(countrows, prows, NULL, NULL, NULL)); -} - -void OleDBConnection::GetColumn(int i, Ref r) const -{ - r.SetValue(current_row[i]); -} - -void OleDBConnection::SyncArgs() -{ - ClearArgs(); - int nparam = cmd_param.GetCount(); - if(nparam == 0) - return; - cmd_bindings.Alloc(nparam); - DBBINDING *cb = cmd_bindings; - memset(cb, 0, sizeof(DBBINDING) * nparam); - int rowbytes = 0; - int i; - for(i = 0; i < nparam; i++, cb++) { - const Param& par = cmd_param[i]; - cb->iOrdinal = i + 1; - cb->obStatus = rowbytes; - cb->dwPart = DBPART_STATUS | DBPART_VALUE; - cb->dwMemOwner = DBMEMOWNER_CLIENTOWNED; - cb->eParamIO = DBPARAMIO_INPUT; - rowbytes += sizeof(dword); - switch(par.vtype) { - default: - NEVER(); - case VOID_V: - cb->wType = DBTYPE_WSTR; - cb->dwPart = DBPART_STATUS; - break; - - case INT_V: - cb->wType = DBTYPE_I4; - cb->obValue = rowbytes; - rowbytes += sizeof(int); - break; - - case DOUBLE_V: - cb->wType = DBTYPE_R8; - rowbytes = (rowbytes + 7) & -8; - cb->obValue = rowbytes; - rowbytes += 8; - break; - - case SQLRAW_V: - cb->wType = DBTYPE_BYTES; - cb->dwPart = DBPART_STATUS | DBPART_VALUE | DBPART_LENGTH; - cb->cbMaxLen = par.alloc + 1; - cb->obValue = rowbytes; - rowbytes = (rowbytes + par.alloc + 1 + 3) & -4; - cb->obLength = rowbytes; - rowbytes += sizeof(DBLENGTH); - break; - - case STRING_V: - cb->wType = DBTYPE_STR; - cb->dwPart = DBPART_STATUS | DBPART_VALUE | DBPART_LENGTH; - cb->cbMaxLen = par.alloc + 1; - cb->obValue = rowbytes; - rowbytes = (rowbytes + par.alloc + 1 + 3) & -4; - cb->obLength = rowbytes; - rowbytes += sizeof(DBLENGTH); - break; - - case WSTRING_V: - cb->wType = DBTYPE_WSTR; - cb->dwPart = DBPART_STATUS | DBPART_VALUE | DBPART_LENGTH; - cb->cbMaxLen = sizeof(wchar) * (par.alloc + 1); - cb->obValue = rowbytes; - rowbytes = (rowbytes + sizeof(wchar) * par.alloc + sizeof(wchar) + 3) & -4; - cb->obLength = rowbytes; - rowbytes += sizeof(DBLENGTH); - break; - - case TIME_V: - cb->wType = DBTYPE_DATE; - rowbytes = (rowbytes + 7) & -8; - cb->obValue = rowbytes; - rowbytes += sizeof(DATE); - break; - } - } - cmd_argbuffer.Alloc(rowbytes); - OleDBVerify(cmd_accessor->CreateAccessor(DBACCESSOR_PARAMETERDATA, - nparam, cmd_bindings, rowbytes, &cmd_haccessor, NULL)); - cb = cmd_bindings; - for(i = 0; i < nparam; i++, cb++) { - const Param& par = cmd_param[i]; - if((*(dword *)(cmd_argbuffer + cb->obStatus) - = IsNull(par.value) ? DBSTATUS_S_ISNULL : DBSTATUS_S_OK) == DBSTATUS_S_OK) - par.bindproc(*cb, cmd_argbuffer, par.value); - } -} - -void OleDBConnection::ClearArgs() -{ - if(cmd_haccessor) { - if(!!cmd_accessor) - cmd_accessor->ReleaseAccessor(cmd_haccessor, NULL); - cmd_haccessor = NULL; - cmd_bindings.Clear(); - cmd_argbuffer.Clear(); - } -} - -void OleDBConnection::Cancel() -{ - current_row.Clear(); - prefetch.Clear(); - if(!!cmd) - cmd->Cancel(); - - fetch_hrows.Clear(); - if(!!fetch_accessor) { - for(int p = 0; p < fetch_bindings.GetCount(); p++) - if(!!fetch_bindings[p].haccessor) - fetch_accessor->ReleaseAccessor(fetch_bindings[p].haccessor, NULL); - } - fetch_bindings.Clear(); - fetch_accessor.Clear(); - fetch_rowset.Clear(); - info.Clear(); - - ClearArgs(); -} - -String OleDBConnection::ToString() const -{ - if(!session) - return "OleDB zombie connection"; - return NFormat("OleDB[user=%s]", session->user); -} - -OleDBSession::OleDBSession() -{ - level = -1; - Dialect(MSSQL); -} - -OleDBSession::~OleDBSession() -{ - Close(); -} - -Array OleDBSession::EnumProviders() -{ - OleInit(); - Array out; - try { - IRef src(CLSID_OLEDB_ENUMERATOR); - IRef rowset; - src->GetSourcesRowset(NULL, IID_IRowset, 0, NULL, rowset.SetUnk()); -/* - IRef cinfo; - OleDBVerify(QueryInterface(rowset, cinfo)); - ULONG count; - OleBuffer columns; - OleBuffer names; - OleDBVerify(cinfo->GetColumnInfo(&count, columns.Set(), names.Set())); - enum { ENAME, EDESC, EGUID, ECOUNT }; - DBCOLUMNINFO fetch_cols[ECOUNT]; - ZeroArray(fetch_cols); - int i; - for(i = 0; i < (int)count; i++) { - WString colname = columns[i].pwszName; - if(colname == L"SOURCES_NAME") fetch_cols[ENAME] = columns[i]; - else if(colname == L"SOURCES_DESCRIPTION") fetch_cols[EDESC] = columns[i]; - else if(colname == L"SOURCES_CLSID") fetch_cols[EGUID] = columns[i]; - } - for(i = 0; i < ECOUNT; i++) - if(!fetch_cols[i].pwszName) - throw Exc("invalid provider enumerator"); - - int rowbytes; - Buffer bindprocs; - Buffer bindings = GetRowDataBindings(fetch_cols, ECOUNT, bindprocs, rowbytes); - Buffer rowbuffer(rowbytes); - - IRef accessor; - OleDBVerify(QueryInterface(rowset, accessor)); - HACCESSOR haccessor; - OleDBVerify(accessor->CreateAccessor(DBACCESSOR_ROWDATA, ECOUNT, bindings, rowbytes, &haccessor, NULL)); - - HROW hrow; - HROW *prow = &hrow; - ULONG countrows; - while(SUCCEEDED(rowset->GetNextRows(DB_NULL_HCHAPTER, 0, 1, &countrows, &prow)) && countrows > 0) { - OleDBVerify(rowset->GetData(hrow, haccessor, rowbuffer)); - Vector data = GetRowData(rowbuffer, bindings, bindprocs, ECOUNT); - OleDBVerify(rowset->ReleaseRows(countrows, prow, NULL, NULL, NULL)); - Provider& provider = out.Add(); - provider.name = data[0]; - provider.description = data[1]; - provider.guid = data[2]; - } - - OleDBVerify(accessor->ReleaseAccessor(haccessor, NULL)); -*/ - OleDBSession dummy; - One conn = new OleDBConnection(&dummy); - conn->Execute(rowset); - Sql0 cursor; - Attach(cursor, -conn); - int cname = -1, cdesc = -1, cguid = -1; - for(int i = 0; i < cursor.GetColumns(); i++) { - String ci = cursor.GetColumnInfo(i).name; - if(ci == "SOURCES_NAME") cname = i; - else if(ci == "SOURCES_DESCRIPTION") cdesc = i; - else if(ci == "SOURCES_CLSID") cguid = i; - } - if(cname < 0) throw Exc("SOURCES_NAME column not found"); - if(cdesc < 0) throw Exc("SOURCES_DESCRIPTION column not found"); - if(cguid < 0) throw Exc("SOURCES_CLSID column not found"); - - while(cursor.Fetch()) { - Provider& provider = out.Add(); - provider.name = cursor[cname]; - provider.description = cursor[cdesc]; - provider.guid = cursor[cguid]; - } - } - catch(Exc e) { - LLOG("OleDB::GetProviders->" << e); - } - return out; -} - -bool OleDBSession::Open(String connect) -{ - const char *b = connect, *p = b; - while(*p && *p != '/' && *p != '@') - p++; - String user(b, p); - String password; - if(*p == '/') { - b = ++p; - while(*p && *p != '@') - p++; - password = String(b, p); - } - String provider, datasource; - if(*p == '@') { - b = ++p; - while(*p && *p != '/') - p++; - provider = String(b, p); - if(*p++) - datasource = p; - } - return Open(user, password, datasource, provider); -} - -bool OleDBSession::Open(String user, String password, String datasource, String provider) -{ - return OpenProp(NFormat("Provider=%s;Data Source=%s;User ID=%s;Password=%s", - provider, datasource, user, password)); -} - -bool OleDBSession::OpenProp(String propset) -{ - Close(); - try { - OleInit(); - IRef init(CLSID_MSDAINITIALIZE); - OleDBVerify(init->GetDataSource(NULL, CLSCTX_INPROC_SERVER, ~OleBstr(propset), - dbinit.GetIID(), dbinit.SetUnk())); - HRESULT hres = dbinit->Initialize(); - if(FAILED(hres)) - throw Exc(OleDBErrorInfo(hres).ToString()); - IRef dbcs(~dbinit); - if(FAILED(hres = dbcs->CreateSession(NULL, dbsession.GetIID(), dbsession.SetUnk()))) - throw Exc(OleDBErrorInfo(hres).ToString()); - QueryInterface(dbsession, transaction); - QueryInterface(dbsession, transaction_object); - IRef dbprop(~dbinit); - DBPROPID propid[] = { DBPROP_AUTH_USERID }; - DBPROPIDSET propidset = { propid, 1 }; - propidset.guidPropertySet = DBPROPSET_DBINIT; - DBPROPSET *propset = NULL; - ULONG outcount; - OleDBVerify(dbprop->GetProperties(1, &propidset, &outcount, &propset)); - if(outcount == 1 && propset->cProperties && propset->rgProperties) - user = ToUpper(String(AsValue(propset->rgProperties->vValue))); - for(int i = 0; i < (int)outcount; i++) { - for(int p = 0; p < (int)propset[i].cProperties; p++) - VariantClear(&propset[i].rgProperties[p].vValue); - CoTaskMemFree(propset[i].rgProperties); - } - CoTaskMemFree(propset); - dialect = DBGUID_DEFAULT; // todo - level = 0; - return true; - } - catch(Exc e) { - SetError(e, "connect"); - dbinit.Clear(); - return false; - } -} - -void OleDBSession::Close() -{ - if(!!dbsession && level > 0) { - LLOG("OleDBSession::Close->transaction level = " << level); - } - while(!clink.IsEmpty()) { - clink.GetNext()->Clear(); - clink.GetNext()->Unlink(); - } - user = Null; - transaction.Clear(); - dbsession.Clear(); - if(!!dbinit && FAILED(dbinit->Uninitialize())) { - LLOG("OleDBSession::Close error, watch out for leaks!"); - } - dbinit.Clear(); - level = -1; -} - -void OleDBSession::Begin() -{ - level++; - ULONG tran_level; - HRESULT hr; - if(!transaction) - SetError("Transactions not supported by data source", "StartTransaction(OleDB)"); - else if(!transaction_object && level >= 2) - SetError("Nested transactions not supported by data source", "StartTransaction(OleDB)"); - else if(FAILED(hr = transaction->StartTransaction(ISOLATIONLEVEL_READCOMMITTED, 0, NULL, &tran_level))) - SetError(OleDBErrorInfo(hr).ToString(), "StartTransaction(OleDB)"); -} - -void OleDBSession::Commit() -{ - level--; - ASSERT(level >= 0); - try { - if(!transaction) - throw Exc("Transactions not supported by data source"); - if(level == 0) - OleDBVerify(transaction->Commit(false, XACTTC_SYNC, 0)); - else if(!transaction_object) - throw Exc("Nested transactions not supported by data source"); - else { - IRef nested_tran; - OleDBVerify(transaction_object->GetTransactionObject(1 + level, nested_tran.Set())); - OleDBVerify(nested_tran->Commit(false, XACTTC_SYNC, 0)); - } - } - catch(Exc e) { - SetError(e, "Commit(OleDB)"); - } -} - -void OleDBSession::Rollback() -{ - level--; - ASSERT(level >= 0); - try { - if(!transaction) - throw Exc("Transactions not supported by data source"); - if(level == 0) - OleDBVerify(transaction->Abort(NULL, false, false)); - else if(!transaction_object) - throw Exc("Nested transactions not supported by data source"); - else { - IRef nested_tran; - OleDBVerify(transaction_object->GetTransactionObject(1 + level, nested_tran.Set())); - OleDBVerify(nested_tran->Abort(NULL, false, false)); - } - } - catch(Exc e) { - SetError(e, "Rollback(OleDB)"); - } -} - -String OleDBSession::Savepoint() -{ - SetError("Savepoints not supported in OleDB", "Savepoint"); - return Null; -} - -void OleDBSession::RollbackTo(const String& savepoint) -{ - SetError("Savepoints not supported in OleDB", "Rollback to Savepoint"); -} - -bool OleDBSession::IsOpen() const -{ - return !!dbinit; -} - -SqlConnection *OleDBSession::CreateConnection() -{ - return new OleDBConnection(this); -} - -Vector OleDBSession::EnumUsers() -{ - Vector out; - return out; -} - -Vector OleDBSession::EnumDatabases() -{ - Vector out; - IRef srowset; - if(SUCCEEDED(QueryInterface(dbsession, srowset)) && !!srowset) { - IRef trowset; - OleVerify(srowset->GetRowset(NULL, DBSCHEMA_CATALOGS, 0, NULL, trowset.GetIID(), 0, NULL, trowset.SetUnk())); - One conn = new OleDBConnection(this); - conn->Execute(trowset); - Sql0 cursor; - Attach(cursor, -conn); - int ccat = -1; - for(int i = 0; i < cursor.GetColumns(); i++) { - String n = cursor.GetColumnInfo(i).name; - if(n == "CATALOG_NAME") ccat = i; - } - if(ccat >= 0) - while(cursor.Fetch()) - out.Add(cursor[ccat]); - } - return out; -} - -Vector OleDBSession::EnumTables(String database) -{ - Vector out; - IRef srowset; - if(SUCCEEDED(QueryInterface(dbsession, srowset)) && !!srowset) { - OleVariant restrictions[1]; - restrictions[0].vt = VT_BSTR; - restrictions[0].bstrVal = StringToBSTR(database); - IRef trowset; - OleVerify(srowset->GetRowset(NULL, DBSCHEMA_TABLES, 1, restrictions, trowset.GetIID(), 0, NULL, trowset.SetUnk())); - One conn = new OleDBConnection(this); - conn->Execute(trowset); - Sql0 cursor; - Attach(cursor, -conn); - int cname = -1; - int cschema = -1; - int ctype = -1; - for(int i = 0; i < cursor.GetColumns(); i++) { - String n = cursor.GetColumnInfo(i).name; - if(n == "TABLE_NAME") cname = i; - else if(n == "TABLE_SCHEMA") cschema = i; - else if(n == "TABLE_TYPE") ctype = i; - } - if(cname >= 0) - while(cursor.Fetch()) { - if(ctype >= 0) { - String t = cursor[ctype]; - if(t == "VIEW" || t == "SYSTEM VIEW") - continue; - } - String t; - if(cschema >= 0) { - String s = cursor[cschema]; - if(!IsNull(s) && s != GetUser()) - t << s << '.'; - } - t << (String)cursor[cname]; - out.Add(t); - } - } - return out; -} - -Vector OleDBSession::EnumViews(String database) -{ - Vector out; - IRef srowset; - if(SUCCEEDED(QueryInterface(dbsession, srowset)) && !!srowset) { - OleVariant restrictions[1]; - restrictions[0].vt = VT_BSTR; - restrictions[0].bstrVal = StringToBSTR(database); - IRef trowset; - OleVerify(srowset->GetRowset(NULL, DBSCHEMA_TABLES, 1, restrictions, trowset.GetIID(), 0, NULL, trowset.SetUnk())); - One conn = new OleDBConnection(this); - conn->Execute(trowset); - Sql0 cursor; - Attach(cursor, -conn); - int cname = -1; - int cschema = -1; - int ctype = -1; - for(int i = 0; i < cursor.GetColumns(); i++) { - String n = cursor.GetColumnInfo(i).name; - if(n == "TABLE_NAME") cname = i; - else if(n == "TABLE_SCHEMA") cschema = i; - else if(n == "TABLE_TYPE") ctype = i; - } - if(cname >= 0) - while(cursor.Fetch()) { - if(ctype >= 0) { - String t = cursor[ctype]; - if(t != "VIEW" && t != "SYSTEM VIEW") - continue; - } - String t; - if(cschema >= 0) { - String s = cursor[cschema]; - if(!IsNull(s) && s != GetUser()) - t << s << '.'; - } - t << (String)cursor[cname]; - out.Add(t); - } - } - return out; -} - -Vector OleDBSession::EnumSequences(String database) -{ - Vector out; - return out; -} - -Vector OleDBSession::EnumPrimaryKey(String database, String table) -{ - Vector out; - IRef srowset; - if(SUCCEEDED(QueryInterface(dbsession, srowset)) && !!srowset) { - OleVariant restrictions[3]; - restrictions[0].vt = VT_BSTR; - restrictions[0].bstrVal = StringToBSTR(database); - Vector parts = Split(table, '.'); - if(parts.GetCount() > 1) { - restrictions[1].vt = VT_BSTR; - restrictions[1].bstrVal = StringToBSTR(parts[0]); - } - if(!parts.IsEmpty()) { - restrictions[2].vt = VT_BSTR; - restrictions[2].bstrVal = StringToBSTR(parts.Top()); - } - IRef trowset; - OleVerify(srowset->GetRowset(NULL, DBSCHEMA_PRIMARY_KEYS, __countof(restrictions), restrictions, - trowset.GetIID(), 0, NULL, trowset.SetUnk())); - One conn = new OleDBConnection(this); - conn->Execute(trowset); - Sql0 cursor; - Attach(cursor, -conn); - int cname = -1; - int cord = -1; - Vector ordinal; - for(int i = 0; i < cursor.GetColumns(); i++) { - String n = cursor.GetColumnInfo(i).name; - if(n == "COLUMN_NAME") - cname = i; - else if(n == "ORDINAL") - cord = i; - } - if(cname >= 0) - while(cursor.Fetch()) { - out.Add(cursor[cname]); - if(cord >= 0) - ordinal.Add(cursor[cord]); - } - if(cord >= 0) - IndexSort(ordinal, out); - } - return out; -} - -String OleDBSession::EnumRowID(String database, String table) -{ - Sql cursor(*this); - String full_name = database; - if(!IsNull(full_name)) full_name.Cat('.'); - full_name.Cat(table); - if(cursor * Select(SqlCol("ROWID")).From(SqlCol(full_name)).Where(SqlBool::False())) - return "ROWID"; - if(cursor * Select(SqlCol("IDENTITYCOL")).From(SqlCol(full_name)).Where(SqlBool::False()) - && cursor.GetColumns() >= 1) - return cursor.GetColumnInfo(0).name; - return Null; -} - -bool OleDBPerformScript(const String& text, StatementExecutor& executor, Gate2 progress_canceled) -{ - const char *p = text; - while(*p) { - String cmd; - while(*p && *p != ';') - if(*p == '\'') { - const char *s = p; - while(*++p && (*p != '\'' || *++p == '\'')) - ; - cmd.Cat(s, int(p - s)); - } - else { - if(*p > ' ') - cmd.Cat(*p); - else if(!cmd.IsEmpty() && *cmd.Last() != ' ') - cmd.Cat(' '); - p++; - } - if(progress_canceled(int(p - text.Begin()), text.GetLength())) - return false; - if(!IsNull(cmd) && !executor.Execute(cmd)) - return false; - if(*p == ';') - p++; - } - return true; -} - -String MSSQLTextType(int width) -{ - if(width <= 4000) - return NFormat("varchar(%d)", width); - return "text"; -} - -} - -#endif diff --git a/archive/uppsrc/OleDB/OleDB.h b/archive/uppsrc/OleDB/OleDB.h deleted file mode 100644 index 6b488f5f9..000000000 --- a/archive/uppsrc/OleDB/OleDB.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef __OLEDB_H__ -#define __OLEDB_H__ - -#include - -#if defined(PLATFORM_WIN32) && defined(COMPILER_MSC) - -#define Font OleFont -#define Picture OlePicture -#define byte win32_byte_ // RpcNdr defines byte -> class with Upp::byte -#define CY win32_CY_ -#include -#include -#include -#include -#include -#include -#undef Font -#undef Picture -#undef byte -#undef CY - -namespace Upp { - -bool OleDBPerformScript(const String& text, StatementExecutor& executor, Gate2 progress_canceled = false); -String MSSQLTextType(int width); - -class OleDBSession : public SqlSession -{ -public: - OleDBSession(); - virtual ~OleDBSession(); - - bool Open(String connect); - bool Open(String user, String password, String datasource, String provider); - bool OpenProp(String propset); - void Close(); - - virtual void Begin(); - virtual void Commit(); - virtual void Rollback(); - - virtual String Savepoint(); - virtual void RollbackTo(const String& savepoint); - - virtual bool IsOpen() const; - virtual RunScript GetRunScript() const { return &OleDBPerformScript; } - - virtual Vector EnumUsers(); - virtual Vector EnumDatabases(); - virtual Vector EnumTables(String database); - virtual Vector EnumViews(String database); - virtual Vector EnumSequences(String database); - virtual Vector EnumPrimaryKey(String database, String table); - virtual String EnumRowID(String database, String table); - - struct Provider - { - String name; - String description; - String guid; - }; - static Array EnumProviders(); - -protected: - virtual SqlConnection *CreateConnection(); - -protected: - friend class OleDBConnection; - - IRef dbinit; - IRef dbsession; - IRef transaction; - IRef transaction_object; - Link clink; - Guid dialect; - String user; - int level; -}; - -} - -#endif - -#endif//__OLEDB_H__ diff --git a/archive/uppsrc/OleDB/OleDB.upp b/archive/uppsrc/OleDB/OleDB.upp deleted file mode 100644 index 3f9cd4b96..000000000 --- a/archive/uppsrc/OleDB/OleDB.upp +++ /dev/null @@ -1,15 +0,0 @@ -description "OLEDB interface\377"; - -uses - Ole, - Sql; - -link(MT DEBUG) /nodefaultlib:LIBCMT; - -file - OleDB.h, - OleDBSchema.h, - OleDB.cpp, - Info readonly separator, - Copying; - diff --git a/archive/uppsrc/OleDB/OleDBSchema.h b/archive/uppsrc/OleDB/OleDBSchema.h deleted file mode 100644 index 791c9b7dc..000000000 --- a/archive/uppsrc/OleDB/OleDBSchema.h +++ /dev/null @@ -1,112 +0,0 @@ -#define BIT(x) COLUMN("bit", int, x, 0, 0) -#define BIT_ARRAY(x, items) COLUMN_ARRAY("bit", int, x, 0, 0, items) -#define BIT_(x) COLUMN_("bit", int, x, 0, 0) -#define BIT_ARRAY_(x, items) COLUMN_ARRAY_("bit", int, x, 0, 0, items) - -#define BOOL(x) COLUMN("bit", int, x, 0, 0) -#define BOOL_ARRAY(x, items) COLUMN_ARRAY("bit", int, x, 0, 0, items) -#define BOOL_(x) COLUMN_("bit", int, x, 0, 0) -#define BOOL_ARRAY_(x, items) COLUMN_ARRAY_("bit", int, x, 0, 0, items) - -#define INT(x) COLUMN("integer", int, x, 0, 0) -#define INT_ARRAY(x, items) COLUMN_ARRAY("integer", int, x, 0, 0, items) -#define INT_(x) COLUMN_("integer", int, x, 0, 0) -#define INT_ARRAY_(x, items) COLUMN_ARRAY_("integer", int, x, 0, 0, items) - -#define BIGINT(x) COLUMN("bigint", int64, x, 0, 0) -#define BIGINT_ARRAY(x, items) COLUMN_ARRAY("bigint", int64, x, 0, 0, items) -#define BIGINT_(x) COLUMN_("bigint", int64, x, 0, 0) -#define BIGINT_ARRAY_(x, items) COLUMN_ARRAY_("bigint", int64, x, 0, 0, items) - -#define DOUBLE(x) COLUMN("double precision", double, x, 0, 0) -#define DOUBLE_ARRAY(x, items) COLUMN_ARRAY("double precision", double, x, 0, 0, items) -#define DOUBLE_(x) COLUMN_("double precision", double, x, 0, 0) -#define DOUBLE_ARRAY_(x, items) COLUMN_ARRAY_("double precision", double, x, 0, 0, items) - -#define DATE(x) COLUMN("datetime", Date, x, 0, 0) -#define DATE_ARRAY(x, items) COLUMN_ARRAY("datetime", Date, x, 0, 0, items) -#define DATE_(x) COLUMN_("datetime", Date, x, 0, 0) -#define DATE_ARRAY_(x, items) COLUMN_ARRAY_("datetime", Date, x, 0, 0, items) - -#define TIME(x) COLUMN("datetime", Time, x, 0, 0) -#define TIME_ARRAY(x, items) COLUMN_ARRAY("datetime", Time, x, 0, 0, items) -#define TIME_(x) COLUMN_("datetime", Time, x, 0, 0) -#define TIME_ARRAY_(x, items) COLUMN_ARRAY_("datetime", Time, x, 0, 0, items) - -#define STRING(x, n) COLUMN(MSSQLTextType(n), String, x, n, 0) -#define STRING_ARRAY(x, n, items) COLUMN_ARRAY(MSSQLTextType(n), String, x, n, 0, items) -#define STRING_(x, n) COLUMN_(MSSQLTextType(n), String, x, n, 0) -#define STRING_ARRAY_(x, n, items) COLUMN_ARRAY_(MSSQLTextType(n), String, x, n, 0, items) - -#define LONGRAW(x) COLUMN("varbinary(max)", String, x, 0, 0) -#define LONGRAW_(x) COLUMN_("varbinary(max)", String, x, 0, 0) - -#ifndef PRIMARY_KEY -#define PRIMARY_KEY INLINE_ATTRIBUTE("primary key")\ - ATTRIBUTE("alter table @t add constraint PK_@x primary key "\ - "(@c)",\ - "alter table @t drop constraint PK_@x;")\ - ATTRIBUTE("create index PKX_@x on @t(@c);", \ - "drop index PKX_@x;") -#endif - -#define KEY INLINE_ATTRIBUTE("key") -#define NOT_NULL INLINE_ATTRIBUTE("not null") -#define IDENTITY INLINE_ATTRIBUTE("identity") -#define AUTO_INCREMENT INLINE_ATTRIBUTE("identity") - -#define INDEX ATTRIBUTE("create index IDX_@x on @t(@c);", \ - "drop index IDX_@x;") -#define UNIQUE ATTRIBUTE("create unique index UNQ_@x on @t(@c);", \ - "drop index UNQ_@x;") -#define REFERENCES(x) ATTRIBUTE("alter table @t add constraint FK_@x foreign key "\ - "(@c) references @s" #x ";",\ - "alter table @t drop constraint FK_@x;") - -#define TIMESTAMP(ts) SCHEMA("-- " ts "\n\n", NULL) - -#define COMMENT(txt) SCHEMA("-- " #txt "\n", NULL) - -#include - -#undef INT -#undef INT_ARRAY -#undef INT_ -#undef INT_ARRAY_ - -#undef BIGINT -#undef BIGINT_ARRAY -#undef BIGINT_ -#undef BIGINT_ARRAY_ - -#undef DOUBLE -#undef DOUBLE_ARRAY -#undef DOUBLE_ -#undef DOUBLE_ARRAY_ - -#undef DATE -#undef DATE_ARRAY -#undef DATE_ -#undef DATE_ARRAY_ - -#undef TIME -#undef TIME_ARRAY -#undef TIME_ -#undef TIME_ARRAY_ - -#undef STRING -#undef STRING_ARRAY -#undef STRING_ -#undef STRING_ARRAY_ - -#undef PRIMARY_KEY -#undef KEY -#undef NOT_NULL -#undef IDENTITY - -#undef INDEX - -#undef UNIQUE - -#undef TIMESTAMP -#undef COMMENT diff --git a/archive/uppsrc/SqlCommander/Copying b/archive/uppsrc/SqlCommander/Copying deleted file mode 100644 index 82aabaae4..000000000 --- a/archive/uppsrc/SqlCommander/Copying +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 2021, The U++ Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted -provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of - conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of - conditions and the following disclaimer in the documentation and/or other materials provided - with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/archive/uppsrc/SqlCommander/SqlCommander.cpp b/archive/uppsrc/SqlCommander/SqlCommander.cpp deleted file mode 100644 index da2792704..000000000 --- a/archive/uppsrc/SqlCommander/SqlCommander.cpp +++ /dev/null @@ -1,201 +0,0 @@ -#include - -#define HAVE_ORACLE - -#ifndef flagNOSQLLITE - #define HAVE_SQLLITE - #include -#endif - -#ifndef flagNOMYSQL - #define HAVE_MYSQL -#endif - -#ifndef flagNOPOSTGRESQL - #define HAVE_POSTGRESQL - #include -#endif - -#if defined(PLATFORM_WIN32) && defined(COMPILER_MSC) - #define HAVE_OLEDB - #include -#endif - -#ifdef HAVE_ORACLE - #include - #include -#endif - -#ifdef HAVE_MYSQL - #ifndef flagMT - #error Must compile MySQL in multithreaded mode! - #endif - #include -#endif - -using namespace Upp; - -#define LAYOUTFILE -#include - -class SqlCommanderApp { -public: - SqlCommanderApp(); - - void Run(); - void Serialize(Stream& s); - -private: - WithLoginLayout login; - enum SERVER_TYPE - { - SERVER_ORACLE, -#ifdef HAVE_MYSQL - SERVER_MYSQL -#endif - }; - One session; -}; - -SqlCommanderApp::SqlCommanderApp() { - CtrlLayoutOKCancel(login, "Connect to server"); - login.password.Password(); - login.save_password = true; -#ifdef HAVE_ORACLE - login.connection.Add("OCI7"); - login.connection.Add("OCI8"); -#endif -#ifdef HAVE_MYSQL - login.connection.Add("MYSQL"); -#endif -#ifdef HAVE_POSTGRESQL - login.connection.Add("POSTGRESQL"); -#endif -#ifdef HAVE_SQLLITE - login.connection.Add("SQLLITE"); -#endif -#ifdef HAVE_OLEDB - Array providers = OleDBSession::EnumProviders(); - for(int i = 0; i < providers.GetCount(); i++) - login.connection.Add("OLEDB:" + providers[i].name); -#endif -} - -void SqlCommanderApp::Serialize(Stream& s) { - int version = 3; - s / version; - if(version < 3) - { - s.SetError(); - return; - } - String pwd; - if(s.IsStoring() && login.save_password) - pwd = Garble(~login.password); - s % login.username % login.database % login.server % login.connection % login.save_password % pwd; - if(s.IsLoading() && login.save_password) - login.password <<= Garble(pwd); -} - -void SqlCommanderApp::Run() { - - LoadFromFile(*this); - - do { - if(login.Run() != IDOK) return; - String un = ~login.username; - String pw = ~login.password; - String db = ~login.database; - String sv = ~login.server; - String co = ~login.connection; - String connect = un; - if(!pw.IsEmpty()) connect << '/' << pw; - if(!sv.IsEmpty()) connect << '@' << sv; -#ifdef HAVE_ORACLE - if(co == "OCI7") { - One oci7 = new Oracle7; - if(!oci7->Open(connect)) { - Exclamation(NFormat("OCI7 login failed: [* \1%s\1].", oci7->GetLastError())); - continue; - } - session = pick(oci7); - } - if(co == "OCI8") { - One oci8 = new Oracle8; - if(!oci8->Open(connect, false)) { - Exclamation(NFormat("OCI8 login failed: [* \1%s\1].", oci8->GetLastError())); - continue; - } - session = pick(oci8); - } -#endif -#ifdef HAVE_MYSQL - if(co == "MYSQL") { - One mysql = new MySqlSession; - if(!mysql->Connect(un, pw, db, sv)) { - Exclamation(NFormat("MySql login failed: [* \1%s\1].", mysql->GetLastError())); - continue; - } - session = pick(mysql); - } -#endif -#ifdef HAVE_POSTGRESQL - if(co == "POSTGRESQL") { - One postgres = new PostgreSQLSession; - String conninfo; - conninfo << "user='" << un << "' password='" << pw << "' "; - if(!IsNull(sv)) { - String port; - int f = sv.Find(':'); - if(f >= 0) { - port = sv.Mid(f + 1); - sv.Trim(f); - } - if(!IsNull(sv)) - conninfo << "host='" << sv << "' "; - if(!IsNull(port)) - conninfo << "port=" << port << ' '; - } - if(!IsNull(db)) - conninfo << "dbname='" << db << "' "; - postgres->Open(conninfo); - session = pick(postgres); - } -#endif -#ifdef HAVE_SQLLITE - if(co == "SQLLITE") { - One sqlite = new Sqlite3Session; - if(!sqlite->Open(db)) { - Exclamation(NFormat("SQLite3 open failed, (db file = [* \1%s\1]): [* \1%s\1].", db, sqlite->GetLastError())); - continue; - } - session = pick(sqlite); - } -#endif -#ifdef HAVE_OLEDB - if(!memcmp(co, "OLEDB:", 6)) { - String conn = co.Mid(6); - One oledb = new OleDBSession; - if(!oledb->Open(un, pw, sv, conn)) { - Exclamation(NFormat("OleDB login failed: [* \1%s\1].", oledb->GetLastError())); - continue; - } - session = pick(oledb); - } -#endif - if(!session) - Exclamation(NFormat("Unsupported connection type: [* \1%s\1].", co)); - } - while(!session); - login.Close(); - SQLCommander(*session); - StoreToFile(*this); -} - -#ifdef flagMAIN -GUI_APP_MAIN -{ - SetLanguage(LNGC_('C', 'S', 'C', 'Z', CHARSET_WIN1250)); - SqlCommanderApp().Run(); -} -#endif//flagMAIN diff --git a/archive/uppsrc/SqlCommander/SqlCommander.h b/archive/uppsrc/SqlCommander/SqlCommander.h deleted file mode 100644 index 96233f63b..000000000 --- a/archive/uppsrc/SqlCommander/SqlCommander.h +++ /dev/null @@ -1,29 +0,0 @@ -// SqlCommander.h : main header file for the SQLCOMMANDER application -// - -#if !defined(AFX_SQLCOMMANDER_H__CA1A67E7_56E3_11D3_A9AA_00C0DF48A075__INCLUDED_) -#define AFX_SQLCOMMANDER_H__CA1A67E7_56E3_11D3_A9AA_00C0DF48A075__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#ifndef __AFXWIN_H__ - #error include 'stdafx.h' before including this file for PCH -#endif - -#include "resource.h" // main symbols - -///////////////////////////////////////////////////////////////////////////// -// CSqlCommanderApp: -// See SqlCommander.cpp for the implementation of this class -// - - - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_SQLCOMMANDER_H__CA1A67E7_56E3_11D3_A9AA_00C0DF48A075__INCLUDED_) diff --git a/archive/uppsrc/SqlCommander/SqlCommander.upp b/archive/uppsrc/SqlCommander/SqlCommander.upp deleted file mode 100644 index 6eb0b3882..000000000 --- a/archive/uppsrc/SqlCommander/SqlCommander.upp +++ /dev/null @@ -1,25 +0,0 @@ -description "Simple SQL console utility\377"; - -uses - SqlCtrl, - Oracle, - plugin\sqlite3, - PostgreSQL; - -uses(!NOMYSQL) MySql; - -link(WIN32 DEBUG MSC) /NODEFAULTLIB:libcmt; - -link(WIN32 !DEBUG MSC) /NODEFAULTLIB:libcmtd; - -file - SqlCommander.cpp, - login.lay, - Info readonly separator, - Copying; - -mainconfig - "" = ".NOMYSQL GUI .NOAPPSQL", - "" = "GUI MT .NOAPPSQL", - "" = ".NOMYSQL GUI .NOAPPSQL .NOPOSTGRESQL"; - diff --git a/archive/uppsrc/SqlCommander/StdAfx.cpp b/archive/uppsrc/SqlCommander/StdAfx.cpp deleted file mode 100644 index 9b4549bbf..000000000 --- a/archive/uppsrc/SqlCommander/StdAfx.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// SqlCommander.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" diff --git a/archive/uppsrc/SqlCommander/login.lay b/archive/uppsrc/SqlCommander/login.lay deleted file mode 100644 index bb1351061..000000000 --- a/archive/uppsrc/SqlCommander/login.lay +++ /dev/null @@ -1,15 +0,0 @@ -LAYOUT(LoginLayout, 398, 106) - ITEM(Label, dv___0, SetLabel(t_("&User name:")).LeftPosZ(4, 62).TopPosZ(4, 19)) - ITEM(EditField, username, LeftPosZ(68, 120).TopPosZ(4, 19)) - ITEM(Label, dv___2, SetLabel(t_("&Password:")).LeftPosZ(4, 62).TopPosZ(26, 19)) - ITEM(EditField, password, LeftPosZ(68, 120).TopPosZ(26, 19)) - ITEM(Label, dv___4, SetLabel(t_("&Database:")).LeftPosZ(208, 62).TopPosZ(4, 19)) - ITEM(EditField, database, LeftPosZ(274, 120).TopPosZ(4, 19)) - ITEM(Label, dv___6, SetLabel(t_("&Server:")).LeftPosZ(208, 62).TopPosZ(26, 19)) - ITEM(EditField, server, LeftPosZ(274, 120).TopPosZ(26, 19)) - ITEM(Label, dv___8, SetLabel(t_("&Connection:")).LeftPosZ(4, 62).TopPosZ(48, 19)) - ITEM(DropList, connection, HSizePosZ(68, 4).TopPosZ(48, 19)) - ITEM(Option, save_password, SetLabel(t_("S&ave password (unsafe!)")).LeftPosZ(8, 140).TopPosZ(82, 19)) - ITEM(Button, ok, SetLabel(t_("OK")).RightPosZ(88, 80).BottomPosZ(5, 21)) - ITEM(Button, cancel, SetLabel(t_("Cancel")).RightPosZ(4, 80).BottomPosZ(4, 22)) -END_LAYOUT diff --git a/archive/uppsrc/TCore/Calc.upp b/archive/uppsrc/TCore/Calc.upp deleted file mode 100644 index 90fead01b..000000000 --- a/archive/uppsrc/TCore/Calc.upp +++ /dev/null @@ -1,12 +0,0 @@ -acceptflags - NOHELP; - -file - Calc.h, - CalcType.h, - CalcType.cpp, - CalcNode.h, - CalcNode.cpp, - CalcNode.lng, - CalcBasic.cpp, - CalcBasic.lng; diff --git a/archive/uppsrc/TCore/CalcBasic.cpp b/archive/uppsrc/TCore/CalcBasic.cpp deleted file mode 100644 index fcf6f8521..000000000 --- a/archive/uppsrc/TCore/CalcBasic.cpp +++ /dev/null @@ -1,1371 +0,0 @@ -////////////////////////////////////////////////////////////////////// -// tadv/CalcBasic.cpp: basic calculator operations. - -#include "TCoreCalc.h" -#pragma hdrstop -#pragma BLITZ_APPROVE - -#include "CalcBasic.h" - -#ifdef PLATFORM_WIN32 -#include -#endif -#ifdef PLATFORM_POSIX -#include -#endif -#ifdef PLATFORM_SOLARIS -#include -#endif - -namespace Upp { - -void UseCalcBasic() {} // to bring in globally constructed objects - -String PluralFormat(int i, const char *b) -{ - if(IsNull(i)) - return Null; - String out; - out << NlsFormat(i) << ' '; - i = tabs(i) % 100; - if(i < 10 || i > 20) - i %= 10; - const char *p = b; - while(*p && *p != '/') - p++; - if(p > b) - out.Cat(b, p - b); - if(*p) - p++; - b = p; - while(*p && *p != '/') - p++; - if(i == 1) - { - out.Cat(b, p - b); - return out; - } - if(*p) - p++; - b = p; - while(*p && *p != '/') - p++; - if(i >= 2 && i <= 4) - { - out.Cat(b, p - b); - return out; - } - if(*p) - p++; - out.Cat(p); - return out; -} - -String GroupComp() { return t_("Comparison"); } -String GroupBitOp() { return t_("Bit field operations"); } -String GroupArith() { return t_("Arithmetical operations"); } -String GroupLog() { return t_("Logical operations"); } -String GroupString() { return t_("Text operations"); } -String GroupDate() { return t_("Date operations"); } -String GroupArray() { return t_("Array functions"); } -String GroupConst() { return t_("Constants"); } -String GroupTrans() { return t_("Transcendental functions"); } -String GroupSystem() { return t_("System functions"); } - -////////////////////////////////////////////////////////////////////// -// equality / inequality - -inline bool CeqVV(Value a, Value b) { return a == b; } -inline bool CneVV(Value a, Value b) { return a != b; } - -FDECL("==", CeqVV, &GroupComp) -FDECL("!=", CneVV, &GroupComp) - -inline bool CltNN(double a, double b) { return a < b; } -inline bool CleNN(double a, double b) { return a <= b; } -inline bool CgtNN(double a, double b) { return a > b; } -inline bool CgeNN(double a, double b) { return a >= b; } - -FDECL("<", CltNN, &GroupComp) -FDECL("<=", CleNN, &GroupComp) -FDECL(">", CgtNN, &GroupComp) -FDECL(">=", CgeNN, &GroupComp) - -inline bool CltTT(Time a, Time b) { return a < b; } -inline bool CleTT(Time a, Time b) { return a <= b; } -inline bool CgtTT(Time a, Time b) { return a > b; } -inline bool CgeTT(Time a, Time b) { return a >= b; } - -FDECL("<", CltTT, &GroupComp) -FDECL("<=", CleTT, &GroupComp) -FDECL(">", CgtTT, &GroupComp) -FDECL(">=", CgeTT, &GroupComp) - -inline bool CltSS(CalcPacket& packet, WString a, WString b) { return GetLanguageInfo(packet.context.language).Compare(a, b) < 0; } -inline bool CleSS(CalcPacket& packet, WString a, WString b) { return GetLanguageInfo(packet.context.language).Compare(a, b) <= 0; } -inline bool CgtSS(CalcPacket& packet, WString a, WString b) { return GetLanguageInfo(packet.context.language).Compare(a, b) > 0; } -inline bool CgeSS(CalcPacket& packet, WString a, WString b) { return GetLanguageInfo(packet.context.language).Compare(a, b) >= 0; } - -FDECLA("<", CltSS, &GroupString) -FDECLA("<=", CleSS, &GroupString) -FDECLA(">", CgtSS, &GroupString) -FDECLA(">=", CgeSS, &GroupString) - -////////////////////////////////////////////////////////////////////// -// bit-op's - -inline int CbitAndNN(int a, int b) { return a & b; } -inline int CbitOrNN(int a, int b) { return a | b; } -inline int CbitXorNN(int a, int b) { return a ^ b; } - -FDECL0("&", CbitAndNN, &GroupBitOp) -FDECL0("|", CbitOrNN, &GroupBitOp) -FDECL0("^", CbitXorNN, &GroupBitOp) - -////////////////////////////////////////////////////////////////////// -// unaries - -inline double CplusN(double value) { return +value; } -inline double CminusN(double value) { return -value; } -inline int CbitNotN(int value) { return ~value; } -inline bool ClogNotN(double value) { return value ? 0 : 1; } -inline bool ClogNotS(WString s) { return s.IsEmpty(); } - -FDECL0("+", CplusN, &GroupArith) -FDECL0("-", CminusN, &GroupArith) -FDECL0("~", CbitNotN, &GroupBitOp) -FDECL("!", ClogNotS, &GroupLog) -FDECL("!", ClogNotN, &GroupLog) - -////////////////////////////////////////////////////////////////////// -// additives - -inline double CaddNN(double a, double b) { return a + b; } -FDECL0("+", CaddNN, &GroupArith) - -inline WString CaddSS(WString a, WString b) { return a + b; } -FDECL ("+", CaddSS, &GroupString) - -inline Time CaddDN(Time a, double b) { return a + fround64(b * 86400.0 + 0.5); } -FDECL0("+", CaddDN, &GroupDate) - -inline Time CaddND(double a, Time b) { return b + fround64(a * 86400.0 + 0.5); } -FDECL0("+", CaddND, &GroupDate) - -inline double CsubNN(double a, double b) { return a - b; } -inline Time CsubDN(Time a, double b) { return a - fround64(b * 86400.0); } -inline double CsubDD(Time a, Time b) { return (a - b) / 86400.0; } - -FDECL0("-", CsubNN, &GroupArith) -FDECL0("-", CsubDN, &GroupDate) -FDECL0("-", CsubDD, &GroupDate) - -////////////////////////////////////////////////////////////////////// -// shifts - -inline int CsalNN(int a, int b) { return a << b; } -inline int CsarNN(int a, int b) { return a >> b; } - -FDECL0("<<", CsalNN, &GroupBitOp) -FDECL0(">>", CsarNN, &GroupBitOp) - -////////////////////////////////////////////////////////////////////// -// multiplicatives - -inline double CmulNN(double a, double b) { return a * b; } -inline WString CmulSN(WString s, int i) -{ - if(i <= 0 || IsNull(s)) - return Null; - if(i == 1) - return s; - int len = s.GetLength() * i; - WStringBuffer result(len); - memsetex(result, s, sizeof(wchar) * s.GetLength(), i); - return result; -} -inline WString CmulNS(int i, WString s) { return CmulSN(s, i); } - -FDECL0("*", CmulNN, &GroupArith) -FDECL0("*", CmulSN, &GroupString) -FDECL0("*", CmulNS, &GroupString) - -inline double CdivNN(double a, double b) -{ - if(!b) - throw Exc(t_("division by zero")); - return a / b; -} - -FDECL0("/", CdivNN, &GroupArith) - -inline double CmodNN(double a, double b) -{ - if(!b) - throw Exc(t_("division by zero")); - return fmod(a, b); -} - -FDECL0("%", CmodNN, &GroupArith) - -////////////////////////////////////////////////////////////////////// -// rounding - -static void ChkDigits(int c) -{ - if(c < -20 || c >= 20) - throw Exc(NFormat(t_("invalid number of places (%d)"), c)); -} - -inline double GetTimes(int c) -{ - ChkDigits(c); - return ipow10(c); -} - -inline double CroundN(double a) { return floor(a + 0.5); } -inline double CroundNN(double a, int c) { double t = GetTimes(c); return floor(a * t + 0.5) / t; } -inline double CroundrNN(double a, int c) { ChkDigits(c); return roundr(a, c); } - -FDECLP0(round, N, &GroupArith) -FDECLP0(round, NN, &GroupArith) -FDECLP0(roundr, NN, &GroupArith) - -inline double CfloorN(double a) { return floor(a); } -inline double CfloorNN(double a, int c) { double t = GetTimes(c); return floor(a * t) / t; } -inline double CfloorrNN(double a, int c) { ChkDigits(c); return floorr(a, c); } - -FDECLP0(floor, N, &GroupArith) -FDECLP0(floor, NN, &GroupArith) -FDECLP0(floorr, NN, &GroupArith) - -inline double CceilN(double a) { return ceil(a); } -inline double CceilNN(double a, int c) { double t = GetTimes(c); return ceil(a * t) / t; } -inline double CceilrNN(double a, int c) { ChkDigits(c); return ceilr(a, c); } - -FDECLP0(ceil, N, &GroupArith) -FDECLP0(ceil, NN, &GroupArith) -FDECLP0(ceilr, NN, &GroupArith) - -inline double CminNN(double a, double b) { return min(a, b); } -inline double CmaxNN(double a, double b) { return max(a, b); } -inline double CminmaxNNN(double a, double l, double h) { return minmax(a, l, h); } - -FDECLP(min, NN, &GroupComp) -FDECLP(max, NN, &GroupComp) -FDECLP(minmax, NNN, &GroupComp) - -inline Time CminTT(Time a, Time b) { return min(a, b); } -inline Time CmaxTT(Time a, Time b) { return max(a, b); } -inline Time CminmaxTTT(Time a, Time l, Time h) { return minmax(a, l, h); } - -FDECLP(min, TT, &GroupComp) -FDECLP(max, TT, &GroupComp) -FDECLP(minmax, TTT, &GroupComp) - -inline WString CminSS(CalcPacket& packet, WString a, WString b) -{ - return GetLanguageInfo(packet.context.language).Compare(a, b) <= 0 ? a : b; -} - -inline WString CmaxSS(CalcPacket& packet, WString a, WString b) -{ - return GetLanguageInfo(packet.context.language).Compare(a, b) >= 0 ? a : b; -} - -inline WString CminmaxSSS(CalcPacket& packet, WString a, WString l, WString h) -{ - return CminSS(packet, CmaxSS(packet, a, l), h); -} - -FDECLAP(min, SS, &GroupComp) -FDECLAP(max, SS, &GroupComp) -FDECLAP(minmax, SSS, &GroupComp) - -inline double Ce0() { return M_E; } -inline double Cpi0() { return M_PI; } - -FDECLP(e, 0, &GroupConst) -FDECLP(pi, 0, &GroupConst) - -inline double CabsN(double x) { return fabs(x); } - -FDECLP(abs, N, &GroupArith) - -inline int CsgnN(double x) { return sgn(x); } - -FDECLP(sgn, N, &GroupArith) - -inline int CascS(WString s) { return (byte)*s; } -inline WString CchrN(int c) { return WString(c, 1); } -inline int ClenS(WString s) { return s.GetLength(); } - -FDECLP(asc, S, &GroupString) -FDECLP(chr, N, &GroupString) -FDECLP(len, S, &GroupString) - -inline String CcountNS(int i, WString s) -{ - return PluralFormat(i, s.ToString()); -} - -FDECLP(count, NS, &GroupString) - -inline String CnlsN(double d) { return NlsFormat(d, 3); } -inline String CnlsNN(double d, int places) { return NlsFormat(d, places); } -inline String CnlsrN(double d) { return NlsFormatRel(d, 3); } -inline String CnlsrNN(double d, int places) { return NlsFormatRel(d, places); } - -FDECLP0(nls, N, &GroupString) -FDECLP0(nls, NN, &GroupString) -FDECLP0(nlsr, N, &GroupString) -FDECLP0(nlsr, NN, &GroupString) - -inline String CtextN(double d) { return FormatDouble(d, 10); } -inline String CitextN(int i) { return FormatInt(i); } -inline String CitextNN(int i, int p) { return FormatIntDec(i, p, ' '); } -inline String Citext0NN(int i, int p) { return FormatIntDec(i, p, '0'); } -inline String CftextN(double d) { return AsString(d, 0); } -inline String CftextNI(double d, int places) { return AsString(d, places); } - -FDECLP(text, N, &GroupString) -FDECLP0(itext, N, &GroupString) -FDECLP0(itext, NN, &GroupString) -FDECLP0(itext0, NN, &GroupString) -FDECLP0(ftext, N, &GroupString) -FDECLP0(ftext, NI, &GroupString) - -inline WString CtextS(WString s) { return s; } - -inline String CtextD(CalcPacket& packet, Time d) -{ return GetLanguageInfo(packet.context.language).FormatDate(d); } - -FDECLP(text, S, &GroupString) -FDECLAP(text, D, &GroupString) - -inline String CtextA(CalcPacket& packet, const ValueArray& va) -{ - String out; - out << "["; - for(int i = 0; i < va.GetCount(); i++) - out << (i ? ", " : "") << packet.context.FormatText(va[i]); - out << "]"; - return out; -} - -FDECLAP(text, A, &GroupString) - -inline WString CleftSN(WString s, int n) { return s.Left(minmax(n, 0, s.GetLength())); } -inline WString CrightSN(WString s, int n) { return s.Right(minmax(n, 0, s.GetLength())); } -inline WString CmidSNN(WString s, int m, int n) -{ - m = minmax(m, 0, s.GetLength()); - n = minmax(n, 0, s.GetLength() - m); - return s.Mid(m, n); -} - -inline WString CmidSN(WString s, int m) { return CmidSNN(s, m, max(0, s.GetLength() - m)); } - -FDECLP(left, SN, &GroupString) -FDECLP(right, SN, &GroupString) -FDECLP(mid, SN, &GroupString) -FDECLP(mid, SNN, &GroupString) - -inline WString CcatSSS(WString a, WString b, WString c) -{ - if(IsNull(c)) - return a; - if(IsNull(a)) - return c; - return a + b + c; -} - -FDECLP(cat, SSS, &GroupString) - -inline WString ClpadSNS(WString a, int len, WString b) -{ - int al = a.GetLength(), bl = b.GetLength(), add = len - al; - if(bl == 0 || add <= 0) - return a; - WString out; - if(bl == 1) - out.Cat(*b, add); - else - { - while(add >= bl) - { - out.Cat(b); - add -= bl; - } - if(add > 0) - out.Cat(b, add); - } - out.Cat(a); - return out; -} - -FDECLP(lpad, SNS, &GroupString) - -inline WString ClpadSN(WString a, int len) { return ClpadSNS(a, len, WString(' ', 1)); } - -FDECLP(lpad, SN, &GroupString) - -WString CllpadSNS(WString a, int len, WString b) -{ - if(a.GetLength() > len) - return a.Right(len); - return ClpadSNS(a, len, b); -} - -FDECLP(llpad, SNS, &GroupString) - -inline WString CllpadSN(WString a, int len) { return CllpadSNS(a, len, WString(' ', 1)); } - -FDECLP(llpad, SN, &GroupString) - -inline WString CrpadSNS(WString a, int len, WString b) -{ - int al = a.GetLength(), bl = b.GetLength(), add = len - al; - if(bl == 0 || add <= 0) - return a; - if(bl == 1) - a.Cat(*b, add); - else - { - while(add >= bl) - { - a.Cat(b); - add -= bl; - } - if(add > 0) - a.Cat(b, add); - } - return a; -} - -FDECLP(rpad, SNS, &GroupString) - -inline WString CrpadSN(WString a, int len) { return CrpadSNS(a, len, WString(' ', 1)); } - -FDECLP(rpad, SN, &GroupString) - -inline WString CrrpadSNS(WString a, int len, WString b) -{ - if(a.GetLength() > len) - { - a.Trim(len); - return a; - } - return CrpadSNS(a, len, b); -} - -FDECLP(rrpad, SNS, &GroupString) - -inline WString CrrpadSN(WString a, int len) { return CrrpadSNS(a, len, WString(' ', 1)); } - -FDECLP(rrpad, SN, &GroupString) - -inline double CnumberS(String s) -{ - const char *p = s; - double d = ScanDouble(p, &p); - if(IsNull(d) || *p) - throw Exc(NFormat(t_("invalid numeric format: '%s'"), s)); - return d; -} - -inline double CnumberSN(String s, double dflt) -{ - const char *p = s; - double d = ScanDouble(p, &p); -#ifdef PLATFORM_WIN32 - return (IsNull(d) || !_finite(d) || _isnan(d) || *p ? dflt : d); -#elif defined(PLATFORM_POSIX) - return (IsNull(d) || !finite(d) || *p ? dflt : d); // PLATFORM_SOLARIS -// return (IsNull(d) || isinf(d) || isnan(d) || *p ? dflt : d); -#else - #error -#endif -} - -FDECLP(number, S, &GroupString) -FDECLP(number, SN, &GroupString) - -inline bool IsValidYear(int year) { return year >= -4000 && year <= +4000; } - -inline Date CdateNNN(int day, int month, int year) -{ - if(!IsValidYear(year)) throw Exc(NFormat(t_("invalid year number (%d)"), year)); - if(month <= 0 || month > 12) throw Exc(NFormat(t_("invalid month number (%d)"), month)); - Date date(year, month, 1); - if(day <= 0 || day > LastDayOfMonth(date).day) - throw Exc(NFormat(t_("invalid day number (%d)"), day)); - date.day = day; - return date; -} - -inline Date CdateNN(int day, int month) { return CdateNNN(day, month, GetSysDate().year); } -inline Date CdateN(int day) -{ - Date date = GetSysDate(); - return CdateNNN(day, date.month, date.year); -} -inline Date Cdate0() { return GetSysDate(); } - -FDECLP0(date, 0, &GroupDate) -FDECLP0(date, N, &GroupDate) -FDECLP0(date, NN, &GroupDate) -FDECLP0(date, NNN, &GroupDate) - -inline Date CdateSD(CalcPacket& packet, String s, Date dflt) -{ - Date out; - const char *p = StrToDate(out, s); - return p ? out : dflt; -} - -inline Date CdateS(CalcPacket& packet, String s) -{ - return CdateSD(packet, s, Null); -} - -inline Date CdateT(Time t) -{ - return t; -} - -FDECLAP(date, S, &GroupDate) -FDECLAP(date, SD, &GroupDate) -FDECLP(date, T, &GroupDate) - -inline Time Ctime0() { return GetSysTime(); } - -FDECLP0(time, 0, &GroupDate) - -bool CtimeNNNNNN(CalcPacket& packet) -{ - if(packet.help) - { - packet.args.SetCount(6, CalcType::Describe()); - packet.result = CalcType