From 84cfbe46f083e3c4211b9c8e8da6f9c9f2a685f9 Mon Sep 17 00:00:00 2001 From: turbocat Date: Wed, 12 Jan 2022 18:44:19 +0000 Subject: [PATCH] TinyHashView: now uses autoimport. git-svn-id: svn://kolibrios.org@9625 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/other/TinyHashView/Tupfile.lua | 19 ++++++++++--------- programs/other/TinyHashView/thashview.c | 4 +--- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/programs/other/TinyHashView/Tupfile.lua b/programs/other/TinyHashView/Tupfile.lua index 99ff879f21..53fe9d49ba 100644 --- a/programs/other/TinyHashView/Tupfile.lua +++ b/programs/other/TinyHashView/Tupfile.lua @@ -1,9 +1,10 @@ -if tup.getconfig("NO_TCC") ~= "" then return end - -TCC="kos32-tcc" -CFLAGS = "-I../../develop/ktcc/trunk/libc.obj/include" -LDFLAGS = "-nostdlib ../../develop/ktcc/trunk/bin/lib/crt0.o -L../../develop/ktcc/trunk/bin/lib" -LIBS = "-ltcc -lcryptal -ldialog -lbox -lc.obj" - -COMMAND=string.format("%s %s %s %s %s ", TCC, CFLAGS, LDFLAGS, "%f -o %o", LIBS) -tup.rule("thashview.c", COMMAND .. tup.getconfig("KPACK_CMD"), "thashview") +if tup.getconfig("NO_TCC") ~= "" then return end +if tup.getconfig("HELPERDIR") == "" +then + HELPERDIR = "../../../programs" +end +tup.include(HELPERDIR .. "/use_tcc.lua") + +LIBS = "-lcryptal -lbox_lib -ldialog" + +link_tcc({"thashview.c"}, "thashview"); diff --git a/programs/other/TinyHashView/thashview.c b/programs/other/TinyHashView/thashview.c index d059591723..a86ff70aff 100644 --- a/programs/other/TinyHashView/thashview.c +++ b/programs/other/TinyHashView/thashview.c @@ -274,9 +274,7 @@ bool hash_compare() // int main(int argc, char** argv) { - kolibri_boxlib_init(); // Загружаем boxlib if(argc<2){ // Если аргументов нет, то запускаем диалог выбора фа - kolibri_dialog_init(); // загружаем proc_lib(libdialog) open_dialog* dialog = kolibri_new_open_dialog(OPEN,0, 0, 420, 320); OpenDialog_init(dialog); OpenDialog_start(dialog); @@ -322,7 +320,7 @@ int main(int argc, char** argv) break; case KSYS_EVENT_KEY: hash_edit_box.text_color = BLACK; - edit_box_key(&hash_edit_box, _ksys_get_key().val); + edit_box_key_safe(&hash_edit_box, _ksys_get_key()); break; case KSYS_EVENT_BUTTON: // Событие обработки кнопок pressed_button = _ksys_get_button(); // Получение кода нажатой кнопки.