From a0ef0e0cd48d93b8e555a788b3ab4b8328165bdf Mon Sep 17 00:00:00 2001 From: Coldy Date: Tue, 8 Feb 2022 09:05:27 +0000 Subject: [PATCH] cmm lib, eolite: prepare to autoimports git-svn-id: svn://kolibrios.org@9699 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/eolite/Eolite.c | 2 ++ programs/cmm/lib/kolibri.h | 20 +++++++++++++++++++- programs/cmm/lib/obj/box_lib.h | 21 ++++++++++++++++++++- programs/cmm/lib/obj/http.h | 13 +++++++++++++ programs/cmm/lib/obj/libimg.h | 17 +++++++++++++++++ programs/cmm/lib/obj/libini.h | 12 ++++++++++++ programs/cmm/lib/obj/proc_lib.h | 5 +++++ 7 files changed, 88 insertions(+), 2 deletions(-) diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index e78718d136..7a00d44660 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -187,9 +187,11 @@ void main() dword id; int old_cur_y; +#ifndef __COFF__ load_dll(boxlib, #box_lib_init,0); load_dll(libini, #lib_init,1); load_dll(libimg, #libimg_init,1); +#endif handle_param(); diff --git a/programs/cmm/lib/kolibri.h b/programs/cmm/lib/kolibri.h index 4faa28fbf5..c5ad4f3104 100644 --- a/programs/cmm/lib/kolibri.h +++ b/programs/cmm/lib/kolibri.h @@ -8,6 +8,8 @@ #pragma option cri- #pragma option -CPA #initallvar 0 + +#ifndef __COFF__ #jumptomain FALSE #startaddress 0 @@ -28,6 +30,16 @@ dword I_Param = #param; dword I_Path = #program_path; char param[4096]; char program_path[4096]; +#else +extern dword __argv; +extern dword __path; + +dword I_Param = #__argv; +dword I_Path = #__path; + +#define param __argv +#define program_path __path +#endif #define bool int @@ -653,13 +665,19 @@ inline fastcall dword GetStartTime() dword __generator; // random number generator init //The initialization of the initial data before running +#ifdef __COFF__ +void start() +#else :void ______INIT______() +#endif { skin_h = @GetSkinHeight(); screen.w = @GetScreenWidth()+1; screen.h = @GetScreenHeight()+1; - __generator = @GetStartTime(); + __generator = @GetStartTime(); +#ifndef __COFF__ mem_init(); +#endif main(); } ______STOP______: diff --git a/programs/cmm/lib/obj/box_lib.h b/programs/cmm/lib/obj/box_lib.h index 3e75fba1b8..e2710a17ee 100644 --- a/programs/cmm/lib/obj/box_lib.h +++ b/programs/cmm/lib/obj/box_lib.h @@ -6,6 +6,25 @@ #include "../lib/kolibri.h" #endif +#ifdef __COFF__ +extern dword edit_box_draw; +extern dword edit_box_key; +extern dword edit_box_mouse; +extern dword edit_box_set_text; + +extern dword scrollbar_v_draw; +extern dword scrollbar_v_mouse; +extern dword scrollbar_h_draw; +extern dword scrollbar_h_mouse; + +extern dword PathShow_prepare; +extern dword PathShow_draw; + +extern dword progressbar_draw; +extern dword progressbar_progress; + +extern dword frame_draw; +#else #ifndef INCLUDE_DLL_H #include "../lib/dll.h" #endif @@ -55,7 +74,7 @@ char aProgressbar_draw [] = "progressbar_draw"; char aProgressbar_progress[] = "progressbar_progress"; char aFrame_draw[] = "frame_draw"; - +#endif struct PathShow_data { diff --git a/programs/cmm/lib/obj/http.h b/programs/cmm/lib/obj/http.h index c6c1c4857a..b450dfe538 100644 --- a/programs/cmm/lib/obj/http.h +++ b/programs/cmm/lib/obj/http.h @@ -5,6 +5,18 @@ #include "../lib/kolibri.h" #endif +#ifdef __COFF__ +extern dword http_get; +extern dword http_head; +extern dword http_post; +extern dword http_find_header_field; +extern dword http_send; +extern dword http_receive; +extern dword http_disconnect; +extern dword http_free; +extern dword http_escape; +extern dword http_unescape; +#else #ifndef INCLUDE_DLL_H #include "../lib/dll.h" #endif @@ -36,6 +48,7 @@ char aHTTPdisconnect[] = "disconnect"; char aHTTPfree[] = "free"; char aURIescape[] = "escape"; char aURIunescape[] = "unescape"; +#endif // status flags #define FLAG_HTTP11 1 << 0 diff --git a/programs/cmm/lib/obj/libimg.h b/programs/cmm/lib/obj/libimg.h index b9d9fba680..cd9d87c58a 100644 --- a/programs/cmm/lib/obj/libimg.h +++ b/programs/cmm/lib/obj/libimg.h @@ -10,6 +10,22 @@ #include "../lib/mem.h" #endif +#ifdef __COFF__ +extern dword img_decode; +extern dword img_destroy; +extern dword img_draw; +extern dword img_create; +extern dword img_encode; +extern dword img_convert; +extern dword img_from_file; +extern dword img_blend; +//extern dword img_is_img; +//extern dword img_to_rgb2; +//extern dword img_scale; +extern dword img_flip; +extern dword img_rotate; +extern dword img_to_rgb; +#else #ifndef INCLUDE_DLL_H #include "../lib/dll.h" #endif @@ -52,6 +68,7 @@ char aimg_scale[] = "img_scale"; //char aimg_is_img[] = "img_is_img"; //char aimg_to_rgb[] = "img_to_rgb"; //char aimg_to_rgb2[] = "img_to_rgb2"; +#endif #define LIBIMG_FORMAT_BMP 1 #define LIBIMG_FORMAT_ICO 2 diff --git a/programs/cmm/lib/obj/libini.h b/programs/cmm/lib/obj/libini.h index d4bbd516c5..cb0d1143d3 100644 --- a/programs/cmm/lib/obj/libini.h +++ b/programs/cmm/lib/obj/libini.h @@ -5,6 +5,17 @@ #include "../lib/kolibri.h" #endif +#ifdef __COFF__ +extern dword ini_enum_sections; +extern dword ini_enum_keys; +extern dword ini_get_str; +extern dword ini_get_int; +extern dword ini_get_color; +extern dword ini_set_str; +extern dword ini_set_int; +//extern dword ini_set_color; +//extern dword ini_get_shortcut; +#else #ifndef INCLUDE_DLL_H #include "../lib/dll.h" #endif @@ -34,6 +45,7 @@ char aini_set_int[] = "ini_set_int"; //char aini_get_shortcut[] = "ini_get_shortcut"; char aini_get_color[] = "ini_get_color"; //char aini_set_color[] = "ini_set_color"; +#endif //===================================================// // // diff --git a/programs/cmm/lib/obj/proc_lib.h b/programs/cmm/lib/obj/proc_lib.h index 260c7c440d..d29379e894 100644 --- a/programs/cmm/lib/obj/proc_lib.h +++ b/programs/cmm/lib/obj/proc_lib.h @@ -5,6 +5,10 @@ #include "../lib/kolibri.h" #endif +#ifdef __COFF__ +extern dword OpenDialog_init; +extern dword OpenDialog_start; +#else #ifndef INCLUDE_DLL_H #include "../lib/dll.h" #endif @@ -18,6 +22,7 @@ $DD 2 dup 0 char aOpenDialog_init[] = "OpenDialog_init"; char aOpenDialog_start[] = "OpenDialog_start"; +#endif struct opendialog {