diff --git a/doc/x86.txt b/doc/x86.txt index 97bfd07..9680a3e 100644 --- a/doc/x86.txt +++ b/doc/x86.txt @@ -359,7 +359,7 @@ Oberon-реализациях выполнение такой операции con_exit: PROCEDURE [stdcall] (bCloseWindow: BOOLEAN); В KolibriOS импортировать процедуры можно только из библиотек, размещенных - в /rd/1/lib. Импортировать и вызывать функции инициализации библиотек + в /sys/lib. Импортировать и вызывать функции инициализации библиотек (lib_init, START) при этом не нужно. Для Linux, импортированные процедуры не реализованы. diff --git a/lib/KolibriOS/ColorDlg.ob07 b/lib/KolibriOS/ColorDlg.ob07 index 584b15b..23c74e3 100644 --- a/lib/KolibriOS/ColorDlg.ob07 +++ b/lib/KolibriOS/ColorDlg.ob07 @@ -1,5 +1,5 @@ (* - Copyright 2016, 2018, 2020 Anton Krotov + Copyright 2016, 2018, 2020, 2022 Anton Krotov This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -65,7 +65,7 @@ BEGIN res.color_type := 0; res.procinfo := sys.ADR(res.procinf[0]); res.com_area_name := sys.ADR(res.s_com_area_name[0]); - res.start_path := sys.SADR("/rd/1/colrdial"); + res.start_path := sys.SADR("/sys/colrdial"); res.draw_window := draw_window; res.status := 0; res.X := 0; @@ -95,7 +95,7 @@ VAR Lib: INTEGER; END GetProc; BEGIN - Lib := KOSAPI.LoadLib("/rd/1/Lib/Proc_lib.obj"); + Lib := KOSAPI.LoadLib("/sys/Lib/Proc_lib.obj"); GetProc(Lib, sys.ADR(Dialog_init), "ColorDialog_init"); GetProc(Lib, sys.ADR(Dialog_start), "ColorDialog_start"); END Load; diff --git a/lib/KolibriOS/ConsoleLib.ob07 b/lib/KolibriOS/ConsoleLib.ob07 index 74346a6..b1b1f2a 100644 --- a/lib/KolibriOS/ConsoleLib.ob07 +++ b/lib/KolibriOS/ConsoleLib.ob07 @@ -1,5 +1,5 @@ (* - Copyright 2016, 2018 Anton Krotov + Copyright 2016, 2018, 2022 Anton Krotov This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -75,7 +75,7 @@ VAR Lib: INTEGER; END GetProc; BEGIN - Lib := KOSAPI.LoadLib("/rd/1/lib/Console.obj"); + Lib := KOSAPI.LoadLib("/sys/lib/Console.obj"); ASSERT(Lib # 0); GetProc(Lib, sys.ADR(version), "version"); GetProc(Lib, sys.ADR(init), "con_init"); diff --git a/lib/KolibriOS/Debug.ob07 b/lib/KolibriOS/Debug.ob07 index daaf40e..c7f9863 100644 --- a/lib/KolibriOS/Debug.ob07 +++ b/lib/KolibriOS/Debug.ob07 @@ -1,5 +1,5 @@ (* - Copyright 2016, 2018 Anton Krotov + Copyright 2016, 2018, 2022 Anton Krotov This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -285,7 +285,7 @@ BEGIN info.param := sys.SADR(" "); info.rsrvd1 := 0; info.rsrvd2 := 0; - info.fname := "/rd/1/develop/board"; + info.fname := "/sys/develop/board"; res := KOSAPI.sysfunc2(70, sys.ADR(info)) END Open; diff --git a/lib/KolibriOS/KOSAPI.ob07 b/lib/KolibriOS/KOSAPI.ob07 index 84a881b..699e7a7 100644 --- a/lib/KolibriOS/KOSAPI.ob07 +++ b/lib/KolibriOS/KOSAPI.ob07 @@ -1,7 +1,7 @@ (* BSD 2-Clause License - Copyright (c) 2018-2019, Anton Krotov + Copyright (c) 2018-2019, 2022 Anton Krotov All rights reserved. *) @@ -338,8 +338,10 @@ END GetStr; PROCEDURE [stdcall] dll_Load* (import_table: INTEGER): INTEGER; +CONST + path = "/sys/lib/"; VAR - imp, lib, exp, proc, res: INTEGER; + imp, lib, exp, proc, res, pathLen: INTEGER; fail, done: BOOLEAN; procname, libname: STRING; @@ -348,12 +350,13 @@ BEGIN fail := FALSE; done := FALSE; res := 0; - libname := "/rd/1/lib/"; + libname := path; + pathLen := LENGTH(libname); REPEAT SYSTEM.GET(import_table, imp); IF imp # 0 THEN SYSTEM.GET(import_table + 4, lib); - GetStr(lib, 10, libname); + GetStr(lib, pathLen, libname); exp := sysfunc3(68, 19, SYSTEM.ADR(libname[0])); fail := exp = 0; ELSE diff --git a/lib/KolibriOS/OpenDlg.ob07 b/lib/KolibriOS/OpenDlg.ob07 index 819d34d..79cfcea 100644 --- a/lib/KolibriOS/OpenDlg.ob07 +++ b/lib/KolibriOS/OpenDlg.ob07 @@ -1,5 +1,5 @@ (* - Copyright 2016, 2018, 2020, 2021 Anton Krotov + Copyright 2016, 2018, 2020-2022 Anton Krotov This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -113,7 +113,7 @@ BEGIN res.filter_area.size := LENGTH(res.filter_area.filter); res.procinfo := sys.ADR(res.procinf[0]); res.com_area_name := sys.ADR(res.s_com_area_name[0]); - res.start_path := sys.SADR("/rd/1/File managers/opendial"); + res.start_path := sys.SADR("/sys/File managers/opendial"); res.opendir_path := sys.ADR(res.s_opendir_path[0]); res.dir_default_path := sys.ADR(res.s_dir_default_path[0]); res.openfile_path := sys.ADR(res.FilePath[0]); @@ -148,7 +148,7 @@ VAR Lib: INTEGER; END GetProc; BEGIN - Lib := KOSAPI.LoadLib("/rd/1/Lib/Proc_lib.obj"); + Lib := KOSAPI.LoadLib("/sys/Lib/Proc_lib.obj"); GetProc(Lib, sys.ADR(Dialog_init), "OpenDialog_init"); GetProc(Lib, sys.ADR(Dialog_start), "OpenDialog_start"); END Load; diff --git a/lib/KolibriOS/RasterWorks.ob07 b/lib/KolibriOS/RasterWorks.ob07 index 5c804aa..672b50b 100644 --- a/lib/KolibriOS/RasterWorks.ob07 +++ b/lib/KolibriOS/RasterWorks.ob07 @@ -1,5 +1,5 @@ (* - Copyright 2016, 2018 KolibriOS team + Copyright 2016, 2018, 2022 KolibriOS team This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -110,7 +110,7 @@ VAR Lib: INTEGER; END GetProc; BEGIN - Lib := KOSAPI.LoadLib("/rd/1/lib/RasterWorks.obj"); + Lib := KOSAPI.LoadLib("/sys/lib/RasterWorks.obj"); ASSERT(Lib # 0); GetProc(Lib, sys.ADR(drawText), "drawText"); GetProc(Lib, sys.ADR(cntUTF_8), "cntUTF-8"); diff --git a/lib/KolibriOS/libimg.ob07 b/lib/KolibriOS/libimg.ob07 index 35e9f5d..0ff0c59 100644 --- a/lib/KolibriOS/libimg.ob07 +++ b/lib/KolibriOS/libimg.ob07 @@ -1,5 +1,5 @@ (* - Copyright 2016, 2018, 2020 KolibriOS team + Copyright 2016, 2018, 2020, 2022 KolibriOS team This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -407,7 +407,7 @@ VAR Lib, formats_table_ptr: INTEGER; END GetProc; BEGIN - Lib := KOSAPI.LoadLib("/rd/1/lib/libimg.obj"); + Lib := KOSAPI.LoadLib("/sys/lib/libimg.obj"); ASSERT(Lib # 0); GetProc(Lib, sys.ADR(img_is_img) , "img_is_img"); GetProc(Lib, sys.ADR(img_to_rgb) , "img_to_rgb"); diff --git a/samples/KolibriOS/Dialogs.ob07 b/samples/KolibriOS/Dialogs.ob07 index 9ba66c6..70cf75e 100644 --- a/samples/KolibriOS/Dialogs.ob07 +++ b/samples/KolibriOS/Dialogs.ob07 @@ -85,7 +85,7 @@ BEGIN back_color := 00FFFFFFH; header := "Dialogs"; draw_window; - Open := OpenDlg.Create(draw_window, 0, "/rd/1", "ASM|TXT|INI"); + Open := OpenDlg.Create(draw_window, 0, "/sys", "ASM|TXT|INI"); Color := ColorDlg.Create(draw_window); WHILE TRUE DO CASE WaitForEvent() OF