From 0565849c3ff78656e97df701d561762cf93c4f86 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 3 Jan 2021 23:02:07 +0000 Subject: [PATCH] cmm: clean up git-svn-id: svn://kolibrios.org@8509 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/{lib => app_plus}/added_sysdir.c | 0 programs/cmm/app_plus/app_plus.c | 2 +- programs/cmm/examples/Tupfile.lua | 1 - programs/cmm/examples/netcheck.c | 101 ------------------ .../{ => experimental}/BrainFuck/brainfuck.c | 0 .../{ => experimental}/BrainFuck/compile.sh | 0 .../BrainFuck/example/hello.bf | 0 .../BrainFuck/example/number.bf | 0 .../cmm/{ => experimental}/lisp/compile.sh | 0 programs/cmm/{ => experimental}/lisp/lisp.c | 0 .../cmm/{ => experimental}/lisp/stdcall.h | 0 programs/cmm/installer/install.c | 2 - 12 files changed, 1 insertion(+), 105 deletions(-) rename programs/cmm/{lib => app_plus}/added_sysdir.c (100%) delete mode 100644 programs/cmm/examples/netcheck.c rename programs/cmm/{ => experimental}/BrainFuck/brainfuck.c (100%) rename programs/cmm/{ => experimental}/BrainFuck/compile.sh (100%) rename programs/cmm/{ => experimental}/BrainFuck/example/hello.bf (100%) rename programs/cmm/{ => experimental}/BrainFuck/example/number.bf (100%) rename programs/cmm/{ => experimental}/lisp/compile.sh (100%) rename programs/cmm/{ => experimental}/lisp/lisp.c (100%) rename programs/cmm/{ => experimental}/lisp/stdcall.h (100%) diff --git a/programs/cmm/lib/added_sysdir.c b/programs/cmm/app_plus/added_sysdir.c similarity index 100% rename from programs/cmm/lib/added_sysdir.c rename to programs/cmm/app_plus/added_sysdir.c diff --git a/programs/cmm/app_plus/app_plus.c b/programs/cmm/app_plus/app_plus.c index d3d3d27df2..8326d1739a 100644 --- a/programs/cmm/app_plus/app_plus.c +++ b/programs/cmm/app_plus/app_plus.c @@ -6,7 +6,7 @@ #include "..\lib\obj\proc_lib.h" #include "..\lib\patterns\simple_open_dialog.h" #include "..\lib\patterns\restart_process.h" -#include "..\lib\added_sysdir.c" +#include "added_sysdir.c" #ifndef AUTOBUILD #include "lang.h--" diff --git a/programs/cmm/examples/Tupfile.lua b/programs/cmm/examples/Tupfile.lua index 66a2477324..40b81bd14f 100644 --- a/programs/cmm/examples/Tupfile.lua +++ b/programs/cmm/examples/Tupfile.lua @@ -10,5 +10,4 @@ tup.rule("rgb.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD tup.rule("console.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "console.com") tup.rule("info.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "info.com") tup.rule("pigex.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "pigex.com") -tup.rule("netcheck.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "netcheck.com") tup.rule("math.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "math.com") diff --git a/programs/cmm/examples/netcheck.c b/programs/cmm/examples/netcheck.c deleted file mode 100644 index b563ddd600..0000000000 --- a/programs/cmm/examples/netcheck.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Network testing utility - * Leency 2018 -*/ - -#define MEMSIZE 4096*10 - -#include "../lib/fs.h" -#include "../lib/gui.h" -#include "../lib/events.h" - -//===================================================// -// // -// DATA // -// // -//===================================================// - -char download_file[] = "-d http://kolibri-n.org/files/KolibriN9.zip"; - -EVENTS button; -EVENTS key; - -//===================================================// -// // -// CODE // -// // -//===================================================// - -void main() -{ - loop() switch(WaitEvent()) - { - case evButton: - button.press( GetButtonID() ); - break; - - case evKey: - GetKeys(); - key.press( key_scancode ); - break; - - case evReDraw: - draw_window(); - break; - } -} - -void draw_window() -{ - sc.get(); - DefineAndDrawWindow(215, 100, 350, 300, 0x34, sc.work, "Network testing utility",0); - button.init(10); - key.init(10); - - WriteText(10,10, 0x90, sc.work_text, "Download via:"); - AddEvent(10, 30, #EventRunAsmDownloader, SCAN_CODE_F1, "ASM Downloader [F1]"); - AddEvent(10, 60, #EventRunCmmDownloader, SCAN_CODE_F2, "C-- Downloader [F2]"); - AddEvent(10, 120, #EventRunNetStat, SCAN_CODE_F3, "NetStat [F3]"); - AddEvent(10, 150, #EventRunNetCfg, SCAN_CODE_F4, "NetCfg [F4]"); - AddEvent(10, 180, #EventRunBoard, SCAN_CODE_F5, "Board [F5]"); - button.add_n(1, #ExitProcess); - key.add_n(SCAN_CODE_ESC, #ExitProcess); -} - -void AddEvent(dword bx, by, event, hotkey, text) -{ - DrawStandartCaptButton(bx, by, button.add(event), text); - key.add_n(hotkey, event); -} - -//===================================================// -// // -// EVENTS // -// // -//===================================================// - -void EventRunAsmDownloader() -{ - RunProgram("/sys/network/downloader", #download_file+3); -} - -void EventRunCmmDownloader() -{ - RunProgram("/sys/network/webview", #download_file); -} - -void EventRunNetStat() -{ - RunProgram("/sys/network/netstat", NULL); -} - -void EventRunNetCfg() -{ - RunProgram("/sys/network/netcfg", NULL); -} - -void EventRunBoard() -{ - RunProgram("/sys/develop/board", NULL); -} - diff --git a/programs/cmm/BrainFuck/brainfuck.c b/programs/cmm/experimental/BrainFuck/brainfuck.c similarity index 100% rename from programs/cmm/BrainFuck/brainfuck.c rename to programs/cmm/experimental/BrainFuck/brainfuck.c diff --git a/programs/cmm/BrainFuck/compile.sh b/programs/cmm/experimental/BrainFuck/compile.sh similarity index 100% rename from programs/cmm/BrainFuck/compile.sh rename to programs/cmm/experimental/BrainFuck/compile.sh diff --git a/programs/cmm/BrainFuck/example/hello.bf b/programs/cmm/experimental/BrainFuck/example/hello.bf similarity index 100% rename from programs/cmm/BrainFuck/example/hello.bf rename to programs/cmm/experimental/BrainFuck/example/hello.bf diff --git a/programs/cmm/BrainFuck/example/number.bf b/programs/cmm/experimental/BrainFuck/example/number.bf similarity index 100% rename from programs/cmm/BrainFuck/example/number.bf rename to programs/cmm/experimental/BrainFuck/example/number.bf diff --git a/programs/cmm/lisp/compile.sh b/programs/cmm/experimental/lisp/compile.sh similarity index 100% rename from programs/cmm/lisp/compile.sh rename to programs/cmm/experimental/lisp/compile.sh diff --git a/programs/cmm/lisp/lisp.c b/programs/cmm/experimental/lisp/lisp.c similarity index 100% rename from programs/cmm/lisp/lisp.c rename to programs/cmm/experimental/lisp/lisp.c diff --git a/programs/cmm/lisp/stdcall.h b/programs/cmm/experimental/lisp/stdcall.h similarity index 100% rename from programs/cmm/lisp/stdcall.h rename to programs/cmm/experimental/lisp/stdcall.h diff --git a/programs/cmm/installer/install.c b/programs/cmm/installer/install.c index aee557e63b..e920978352 100644 --- a/programs/cmm/installer/install.c +++ b/programs/cmm/installer/install.c @@ -114,8 +114,6 @@ void DrawLogo() void EventInstall() { - //#include "..\lib\added_sysdir.c"; - //SetAdditionalSystemDirectory("kolibrios", abspath("install/kolibrios")+1); ini_set_int stdcall ("/sys/settings/taskbar.ini", "Flags", "Attachment", 0); copyf("/kolibrios/KolibriNext/settings", "/sys/settings");