diff --git a/bazaar/Tcc Demo Gui/Tcc Demo Gui.lay b/bazaar/Tcc Demo Gui/Tcc Demo Gui.lay deleted file mode 100644 index ed7127a6f..000000000 --- a/bazaar/Tcc Demo Gui/Tcc Demo Gui.lay +++ /dev/null @@ -1,10 +0,0 @@ -LAYOUT(DaysLayout, 584, 452) - ITEM(LineEdit, SourceCode, HSizePosZ(8, 8).VSizePosZ(76, 36)) - ITEM(Button, ButRun, SetLabel(t_("Compile + Run")).RightPosZ(8, 100).BottomPosZ(9, 23)) - ITEM(Label, dv___2, SetLabel(t_("Just modify source code and push \"Compile + Run\"")).SetFont(StdFont().Bold()).HSizePosZ(8, 8).TopPosZ(8, 19)) - ITEM(Label, dv___3, SetLabel(t_("Libs path:")).LeftPosZ(8, 68).TopPosZ(52, 19)) - ITEM(Label, dv___4, SetLabel(t_("Include path:")).LeftPosZ(8, 68).TopPosZ(32, 19)) - ITEM(EditString, EditLibsPath, SetFrame(ThinInsetFrame()).HSizePosZ(76, 8).TopPosZ(52, 19)) - ITEM(EditString, EditIncludePath, SetFrame(ThinInsetFrame()).HSizePosZ(76, 8).TopPosZ(32, 19)) -END_LAYOUT - diff --git a/bazaar/Tcc Demo Gui/Tcc Demo Gui.upp b/bazaar/Tcc Demo Gui/Tcc Demo Gui.upp deleted file mode 100644 index 1503a665f..000000000 --- a/bazaar/Tcc Demo Gui/Tcc Demo Gui.upp +++ /dev/null @@ -1,13 +0,0 @@ -description "Tiny C Compiler wrapper Demo\377"; - -uses - CtrlLib, - Tcc; - -file - main.cpp, - "Tcc Demo Gui.lay"; - -mainconfig - "" = "GUI"; - diff --git a/bazaar/Tcc Demo Gui/init b/bazaar/Tcc Demo Gui/init deleted file mode 100644 index 43cefcd6c..000000000 --- a/bazaar/Tcc Demo Gui/init +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef _Tcc_Demo_Gui_icpp_init_stub -#define _Tcc_Demo_Gui_icpp_init_stub -#include "CtrlLib/init" -#include "Tcc/init" -#endif diff --git a/bazaar/Tcc Demo Gui/main.cpp b/bazaar/Tcc Demo Gui/main.cpp deleted file mode 100644 index 4e48fad71..000000000 --- a/bazaar/Tcc Demo Gui/main.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include - -using namespace Upp; - -#define LAYOUTFILE -#include - -class Tcc_Demo : public WithDaysLayout { -public: - void RunProgram(); - - typedef Tcc_Demo CLASSNAME; - Tcc_Demo(); -}; - -#include "Tcc/Tcc.h" - -// Function to be called from the tcc program -double plus(double a, double b) -{ - return a + b; -} - -// Source code -char my_program[] = - "#include \n" - "#include \n" - "\n" - "double plus(double a, double b); // External function has to be declared\n" - "\n" - "double pow2(double d)\n" - "{\n" - " return (d*d);\n" - "}\n" - "\n" - "double test(double a, char *str)\n" - "{\n" - " if (a < 0.)\n" - " throw(\"Argument is negative!\");\n" - " double ret = 0;\n" - " int i;\n" - " for (i = 0; i < 10000000; ++i)\n" - " ret += 0.000000001*pow2(sqrt(plus(a, 10)));\n" - " snprintf(str, 1024, \"The result is %f\", ret);\n" - " return ret;\n" - "}"; - -void Tcc_Demo::RunProgram() -{ - Tcc tcc; - - // Set the right directories here - tcc.AddIncludePath(EditIncludePath.GetData().ToString()); - tcc.AddLibraryPath(EditLibsPath.GetData().ToString()); - - try { - tcc.Compile(SourceCode.GetData().ToString()); - - tcc.AddSymbol("plus", (void *)&plus); - tcc.Link(); - double (*mytest1)(double, char *) = (double (*)(double, char *))tcc.GetSymbol("test"); - - char str[1024]; - double res = mytest1(90, str); - PromptOK("\nThe result for Test is " + FormatDouble(res) + ". " + str); - } catch(Exc err){ - Exclamation(DeQtfLf(err)); - } -} - -Tcc_Demo::Tcc_Demo() -{ - CtrlLayout(*this, "Tcc Demo"); - ButRun.WhenPush = THISBACK(RunProgram); - SourceCode.SetData(my_program); - EditIncludePath <<= "...put here right path.../Tcc/lib/include"; //c:/desarrollo/aplicaciones/zlibs - EditLibsPath <<= "...put here right path.../Tcc/lib/lib"; - SourceCode.SetFont(Courier(12)); - Sizeable(); -} - -GUI_APP_MAIN -{ - Tcc_Demo().Run(); -}