From 23d86a6122a0d8cd4879a0a43647341458ecd46f Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Mon, 7 Nov 2016 14:41:01 +0000 Subject: [PATCH] CMM: add template app, console library headers git-svn-id: svn://kolibrios.org@6684 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/lib/debug.h | 15 ++---- programs/cmm/lib/obj/console.h | 75 ++++++++++++++++++++++++++++ programs/cmm/template/Tupfile.lua | 6 +++ programs/cmm/template/compile_en.bat | 5 ++ programs/cmm/template/template.c | 37 ++++++++++++++ 5 files changed, 126 insertions(+), 12 deletions(-) create mode 100644 programs/cmm/lib/obj/console.h create mode 100644 programs/cmm/template/Tupfile.lua create mode 100644 programs/cmm/template/compile_en.bat create mode 100644 programs/cmm/template/template.c diff --git a/programs/cmm/lib/debug.h b/programs/cmm/lib/debug.h index e67bc8268a..4c86734389 100644 --- a/programs/cmm/lib/debug.h +++ b/programs/cmm/lib/debug.h @@ -58,19 +58,10 @@ inline void debugi(dword d_int) debugi(number); } -:void assert(dword _type, _actual, _expected) +:void die(dword _last_msg) { - char r[4096]; - if (_type=='s') { - if (streq(_actual, _expected)) return; - sprintf(#r, "==========nok{\nactual: %s\nexpected: %s", _actual, _expected); - debugln(#r); - } - if (_type=='i') { - if (_actual == _expected)) return; - sprintf(#r, "==========nok{\nactual: %i\nexpected: %i", _actual, _expected); - debugln(#r); - } + debugln(_last_msg); + ExitProcess(); } #endif \ No newline at end of file diff --git a/programs/cmm/lib/obj/console.h b/programs/cmm/lib/obj/console.h new file mode 100644 index 0000000000..51e8f64d5e --- /dev/null +++ b/programs/cmm/lib/obj/console.h @@ -0,0 +1,75 @@ +#ifndef INCLUDE_CONSOLE_H +#define INCLUDE_CONSOLE_H +#print "[include