From da5f9a4251552dc65898febfdc49360b4467f3bb Mon Sep 17 00:00:00 2001 From: cxl Date: Fri, 22 Jan 2021 10:22:07 +0000 Subject: [PATCH] Obsolete packages moved to archive git-svn-id: svn://ultimatepp.org/upp/trunk@15690 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/AnalyzeMap/Analyze.cpp | 118 -------- uppsrc/AnalyzeMap/AnalyzeMap.upp | 14 - uppsrc/AnalyzeMap/Copying | 22 -- uppsrc/AnalyzeMap/crash.ico | Bin 974 -> 0 bytes uppsrc/AnalyzeMap/crash.mak | 313 --------------------- uppsrc/AnalyzeMap/imagehlp.dli | 1 - uppsrc/BuildAll/BuildAll.cpp | 125 --------- uppsrc/BuildAll/BuildAll.upp | 11 - uppsrc/CbGen/CbGen.upp | 13 - uppsrc/CbGen/Copying | 22 -- uppsrc/CbGen/CppGen.cpp | 401 --------------------------- uppsrc/SqlCommander/Copying | 22 -- uppsrc/SqlCommander/SqlCommander.cpp | 201 -------------- uppsrc/SqlCommander/SqlCommander.h | 29 -- uppsrc/SqlCommander/SqlCommander.upp | 26 -- uppsrc/SqlCommander/StdAfx.cpp | 5 - uppsrc/SqlCommander/login.lay | 15 - uppsrc/Updater/Copying | 22 -- uppsrc/Updater/Resource.h | 18 -- uppsrc/Updater/Updater.cpp | 23 -- uppsrc/Updater/Updater.h | 22 -- uppsrc/Updater/Updater.ico | Bin 1078 -> 0 bytes uppsrc/Updater/Updater.rc | 1 - uppsrc/Updater/Updater.upp | 14 - 24 files changed, 1438 deletions(-) delete mode 100644 uppsrc/AnalyzeMap/Analyze.cpp delete mode 100644 uppsrc/AnalyzeMap/AnalyzeMap.upp delete mode 100644 uppsrc/AnalyzeMap/Copying delete mode 100644 uppsrc/AnalyzeMap/crash.ico delete mode 100644 uppsrc/AnalyzeMap/crash.mak delete mode 100644 uppsrc/AnalyzeMap/imagehlp.dli delete mode 100644 uppsrc/BuildAll/BuildAll.cpp delete mode 100644 uppsrc/BuildAll/BuildAll.upp delete mode 100644 uppsrc/CbGen/CbGen.upp delete mode 100644 uppsrc/CbGen/Copying delete mode 100644 uppsrc/CbGen/CppGen.cpp delete mode 100644 uppsrc/SqlCommander/Copying delete mode 100644 uppsrc/SqlCommander/SqlCommander.cpp delete mode 100644 uppsrc/SqlCommander/SqlCommander.h delete mode 100644 uppsrc/SqlCommander/SqlCommander.upp delete mode 100644 uppsrc/SqlCommander/StdAfx.cpp delete mode 100644 uppsrc/SqlCommander/login.lay delete mode 100644 uppsrc/Updater/Copying delete mode 100644 uppsrc/Updater/Resource.h delete mode 100644 uppsrc/Updater/Updater.cpp delete mode 100644 uppsrc/Updater/Updater.h delete mode 100644 uppsrc/Updater/Updater.ico delete mode 100644 uppsrc/Updater/Updater.rc delete mode 100644 uppsrc/Updater/Updater.upp diff --git a/uppsrc/AnalyzeMap/Analyze.cpp b/uppsrc/AnalyzeMap/Analyze.cpp deleted file mode 100644 index e889dbcc5..000000000 --- a/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/uppsrc/AnalyzeMap/AnalyzeMap.upp b/uppsrc/AnalyzeMap/AnalyzeMap.upp deleted file mode 100644 index fc95ae072..000000000 --- a/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/uppsrc/AnalyzeMap/Copying b/uppsrc/AnalyzeMap/Copying deleted file mode 100644 index 27fc52607..000000000 --- a/uppsrc/AnalyzeMap/Copying +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 2020, 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/uppsrc/AnalyzeMap/crash.ico b/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/uppsrc/AnalyzeMap/crash.mak b/uppsrc/AnalyzeMap/crash.mak deleted file mode 100644 index 54a32b03d..000000000 --- a/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/uppsrc/AnalyzeMap/imagehlp.dli b/uppsrc/AnalyzeMap/imagehlp.dli deleted file mode 100644 index 2320a0229..000000000 --- a/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/uppsrc/BuildAll/BuildAll.cpp b/uppsrc/BuildAll/BuildAll.cpp deleted file mode 100644 index 0ece52a91..000000000 --- a/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/uppsrc/BuildAll/BuildAll.upp b/uppsrc/BuildAll/BuildAll.upp deleted file mode 100644 index ee985e8c0..000000000 --- a/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/uppsrc/CbGen/CbGen.upp b/uppsrc/CbGen/CbGen.upp deleted file mode 100644 index b50c992a3..000000000 --- a/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/uppsrc/CbGen/Copying b/uppsrc/CbGen/Copying deleted file mode 100644 index 27fc52607..000000000 --- a/uppsrc/CbGen/Copying +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 2020, 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/uppsrc/CbGen/CppGen.cpp b/uppsrc/CbGen/CppGen.cpp deleted file mode 100644 index 083c5adfe..000000000 --- a/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/uppsrc/SqlCommander/Copying b/uppsrc/SqlCommander/Copying deleted file mode 100644 index 27fc52607..000000000 --- a/uppsrc/SqlCommander/Copying +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 2020, 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/uppsrc/SqlCommander/SqlCommander.cpp b/uppsrc/SqlCommander/SqlCommander.cpp deleted file mode 100644 index 62c673ae1..000000000 --- a/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/uppsrc/SqlCommander/SqlCommander.h b/uppsrc/SqlCommander/SqlCommander.h deleted file mode 100644 index 81b4235eb..000000000 --- a/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/uppsrc/SqlCommander/SqlCommander.upp b/uppsrc/SqlCommander/SqlCommander.upp deleted file mode 100644 index eeea55f57..000000000 --- a/uppsrc/SqlCommander/SqlCommander.upp +++ /dev/null @@ -1,26 +0,0 @@ -description "Simple SQL console utility\377"; - -uses - SqlCtrl, - Oracle, - OleDB, - 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/uppsrc/SqlCommander/StdAfx.cpp b/uppsrc/SqlCommander/StdAfx.cpp deleted file mode 100644 index 7c970244f..000000000 --- a/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/uppsrc/SqlCommander/login.lay b/uppsrc/SqlCommander/login.lay deleted file mode 100644 index 318762b3f..000000000 --- a/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/uppsrc/Updater/Copying b/uppsrc/Updater/Copying deleted file mode 100644 index 27fc52607..000000000 --- a/uppsrc/Updater/Copying +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 1998, 2020, 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/uppsrc/Updater/Resource.h b/uppsrc/Updater/Resource.h deleted file mode 100644 index 2c6c289e3..000000000 --- a/uppsrc/Updater/Resource.h +++ /dev/null @@ -1,18 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by UPDATER.RC -// -#define IDR_MAINFRAME 128 -#define IDD_UPDATER_DIALOG 102 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS - -#define _APS_NEXT_RESOURCE_VALUE 129 -#define _APS_NEXT_COMMAND_VALUE 32771 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/uppsrc/Updater/Updater.cpp b/uppsrc/Updater/Updater.cpp deleted file mode 100644 index 541548c12..000000000 --- a/uppsrc/Updater/Updater.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include - -using namespace Upp; - -GUI_APP_MAIN -{ - const Vector& cmdline = CommandLine(); - SetDefaultCharset(CHARSET_WIN1250); - if(cmdline.IsEmpty()) - { - Exclamation("[* UPDATER] should be run from another applications"); - return; - } - String name = cmdline[0]; - UpdateFile(name); - String exec = GetExeDirFile(name); - for(int i = 1; i < cmdline.GetCount(); i++) - if(cmdline[i].Find(' ') >= 0) - exec << " \"" << cmdline[i] << "\""; - else - exec << " " << cmdline[i]; - WinExec(exec, SW_SHOWNORMAL); -} diff --git a/uppsrc/Updater/Updater.h b/uppsrc/Updater/Updater.h deleted file mode 100644 index 39e94f595..000000000 --- a/uppsrc/Updater/Updater.h +++ /dev/null @@ -1,22 +0,0 @@ -#if !defined(AFX_UPDATER_H__DA682885_AD16_11D1_AE92_444553540000__INCLUDED_) -#define AFX_UPDATER_H__DA682885_AD16_11D1_AE92_444553540000__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 - -class CUpdaterApp : public CWinApp -{ -public: - CUpdaterApp(); - virtual BOOL InitInstance(); - DECLARE_MESSAGE_MAP() -}; - -#endif // !defined(AFX_UPDATER_H__DA682885_AD16_11D1_AE92_444553540000__INCLUDED_) diff --git a/uppsrc/Updater/Updater.ico b/uppsrc/Updater/Updater.ico deleted file mode 100644 index 7eef0bcbe6580a6f464d688906172c2d9de44262..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1078 zcmc&zF>b>!3}jLb9s)T}@Kod(893@u8ajANzT`op9^o+)S?=nU(FD@%0s)Sg^oyC8{H z9myetc;MEP)59v(LMa~xK8Yu^jIR*H22uCFiq5%C{s7(PJi>o15i^bmX4(vPxWAio z9ryY#AU_jfnd047-@`)XzL?%iS$gQyFP{44kS9X)fN{{QoL~hO-&=q&20Zr*cxFAt PkaNE{wR~2C$NfnjhSXWT diff --git a/uppsrc/Updater/Updater.rc b/uppsrc/Updater/Updater.rc deleted file mode 100644 index bd0faa4e7..000000000 --- a/uppsrc/Updater/Updater.rc +++ /dev/null @@ -1 +0,0 @@ -100 ICON DISCARDABLE "Updater.ico" diff --git a/uppsrc/Updater/Updater.upp b/uppsrc/Updater/Updater.upp deleted file mode 100644 index db3eb1dd2..000000000 --- a/uppsrc/Updater/Updater.upp +++ /dev/null @@ -1,14 +0,0 @@ -description "Utility for U++ enterprise application update system\377"; - -uses - CtrlLib; - -file - Updater.rc, - Updater.cpp, - Info readonly separator, - Copying; - -mainconfig - "" = "GUI"; -