diff --git a/data/common/fb2read b/data/common/fb2read index a7c728cd6e..d40d493591 100644 Binary files a/data/common/fb2read and b/data/common/fb2read differ diff --git a/programs/develop/cedit/CEDIT b/programs/develop/cedit/CEDIT index 2f1b4869e0..88a311c85b 100644 Binary files a/programs/develop/cedit/CEDIT and b/programs/develop/cedit/CEDIT differ diff --git a/programs/develop/cedit/SRC/CEdit.ob07 b/programs/develop/cedit/SRC/CEdit.ob07 index 9df65b598e..6f65c712b0 100644 --- a/programs/develop/cedit/SRC/CEdit.ob07 +++ b/programs/develop/cedit/SRC/CEdit.ob07 @@ -28,7 +28,7 @@ IMPORT RW, Ini, EB := EditBox, Tabs, Toolbar, SB := StatusBar; CONST - HEADER = "CEdit (02-jan-2022)"; + HEADER = "CEdit (05-jan-2022)"; ShellFilter = ""; EditFilter = "SH|INC|TXT|ASM|OB07|C|CPP|H|PAS|PP|LUA|INI|JSON"; @@ -568,7 +568,7 @@ BEGIN temp := "'CEdit: "; U.append8(temp, s); U.append8(temp, "' -E"); - K.Run("/rd/1/@notify", temp) + K.Run("/sys/@notify", temp) END error; @@ -928,7 +928,7 @@ END goto; PROCEDURE Script (script: ARRAY OF CHAR); BEGIN IF script # "" THEN - K.Run("/rd/1/@open", script) + K.Run("/sys/@open", script) END END Script; @@ -1143,7 +1143,7 @@ BEGIN |menuClose: closeFile(TRUE, curText) |menuFolder: - K.Run("/rd/1/File Managers/Eolite", text.fileName) + K.Run("/sys/File Managers/Eolite", text.fileName) |menuExit: Close |menuUndo: @@ -1220,13 +1220,13 @@ BEGIN |menuCR: T.setEol(text, RW.EOL_CR) |menuPipet: - K.Run("/rd/1/develop/pipet", "") + K.Run("/sys/develop/pipet", "") |menuMagnify: - K.Run("/rd/1/magnify", "") + K.Run("/sys/magnify", "") |menuBoard: - K.Run("/rd/1/develop/board", "") + K.Run("/sys/develop/board", "") |menuSysFunc: - K.Run("/rd/1/docpack", "f") + K.Run("/sys/docpack", "f") |menuColors..menuMaxColors: Ini.selectSection(IPC[2] - menuColors) |menuMoveUp: @@ -2034,7 +2034,7 @@ BEGIN Ini.getSettings(buildScript, runScript, debugScript); IF fileName = "" THEN text := T.New(); - filePath := "/rd/1" + filePath := "/sys" ELSE text := T.open(fileName, err); IF text = NIL THEN diff --git a/programs/develop/cedit/SRC/EditBox.ob07 b/programs/develop/cedit/SRC/EditBox.ob07 index a04488c9a7..76c3a22312 100644 --- a/programs/develop/cedit/SRC/EditBox.ob07 +++ b/programs/develop/cedit/SRC/EditBox.ob07 @@ -1,5 +1,5 @@ (* - Copyright 2016, 2017, 2020, 2021 Anton Krotov + Copyright 2016, 2017, 2020-2022 Anton Krotov This file is part of CEdit. @@ -142,7 +142,7 @@ PROCEDURE main; VAR Lib: INTEGER; BEGIN - Lib := KOSAPI.LoadLib("/rd/1/lib/box_lib.obj"); + Lib := KOSAPI.LoadLib("/sys/lib/box_lib.obj"); ASSERT(Lib # 0); GetProc(Lib, SYSTEM.ADR(paint), "edit_box"); GetProc(Lib, SYSTEM.ADR(key_proc), "edit_box_key"); diff --git a/programs/develop/cedit/SRC/Icons.ob07 b/programs/develop/cedit/SRC/Icons.ob07 index 5d042bad01..efb4169b9b 100644 --- a/programs/develop/cedit/SRC/Icons.ob07 +++ b/programs/develop/cedit/SRC/Icons.ob07 @@ -1,5 +1,5 @@ (* - Copyright 2021 Anton Krotov + Copyright 2021, 2022 Anton Krotov This file is part of CEdit. @@ -23,7 +23,7 @@ IMPORT LibImg, K := KolibriOS, Graph, SYSTEM; CONST - fileName = "/rd/1/Icons16.png"; + fileName = "/sys/Icons16.png"; SIZE* = 18; VAR diff --git a/programs/develop/cedit/SRC/Ini.ob07 b/programs/develop/cedit/SRC/Ini.ob07 index 850acb3a5a..e326d1b7fe 100644 --- a/programs/develop/cedit/SRC/Ini.ob07 +++ b/programs/develop/cedit/SRC/Ini.ob07 @@ -1,5 +1,5 @@ (* - Copyright 2021 Anton Krotov + Copyright 2021, 2022 Anton Krotov This file is part of CEdit. @@ -183,10 +183,10 @@ BEGIN Utils.append8(IniFileName, fileName); IF ~File.Exists(IniFileName) THEN - IniFileName := "/rd/1/settings/cedit.ini" + IniFileName := "/sys/settings/cedit.ini" END; - Lib := KOSAPI.LoadLib("/rd/1/Lib/Libini.obj"); + Lib := KOSAPI.LoadLib("/sys/Lib/Libini.obj"); GetProc(Lib, SYSTEM.ADR(get_color), "ini_get_color"); GetProc(Lib, SYSTEM.ADR(get_int), "ini_get_int"); GetProc(Lib, SYSTEM.ADR(get_str), "ini_get_str"); diff --git a/programs/develop/cedit/SRC/KOSAPI.ob07 b/programs/develop/cedit/SRC/KOSAPI.ob07 index 84a881bbaf..699e7a7a97 100644 --- a/programs/develop/cedit/SRC/KOSAPI.ob07 +++ b/programs/develop/cedit/SRC/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/programs/develop/cedit/SRC/OpenDlg.ob07 b/programs/develop/cedit/SRC/OpenDlg.ob07 index 36acbf3d51..e97c12634c 100644 --- a/programs/develop/cedit/SRC/OpenDlg.ob07 +++ b/programs/develop/cedit/SRC/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 @@ -130,7 +130,7 @@ BEGIN res.status := 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/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]); @@ -163,7 +163,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/programs/develop/cedit/SRC/libimg.ob07 b/programs/develop/cedit/SRC/libimg.ob07 index 19272028e6..c8fc9f0519 100644 --- a/programs/develop/cedit/SRC/libimg.ob07 +++ b/programs/develop/cedit/SRC/libimg.ob07 @@ -1,5 +1,5 @@ (* - Copyright 2016, 2021 Anton Krotov + Copyright 2016, 2021, 2022 Anton Krotov This file is part of CEdit. @@ -107,7 +107,7 @@ VAR Lib: INTEGER; END GetProc; BEGIN - Lib := KOSAPI.LoadLib("/rd/1/Lib/Libimg.obj"); + Lib := KOSAPI.LoadLib("/sys/Lib/Libimg.obj"); GetProc(Lib, SYSTEM.ADR(img_decode), "img_decode"); GetProc(Lib, SYSTEM.ADR(img_destroy), "img_destroy"); GetProc(Lib, SYSTEM.ADR(img_to_rgb2), "img_to_rgb2"); diff --git a/programs/develop/oberon07/Compiler.kex b/programs/develop/oberon07/Compiler.kex index 7f7665c6d2..d29404e559 100644 Binary files a/programs/develop/oberon07/Compiler.kex and b/programs/develop/oberon07/Compiler.kex differ diff --git a/programs/develop/oberon07/doc/x86.txt b/programs/develop/oberon07/doc/x86.txt index 142c0b5148..ee813fbf79 100644 --- a/programs/develop/oberon07/doc/x86.txt +++ b/programs/develop/oberon07/doc/x86.txt @@ -31,6 +31,7 @@ UTF-8 с BOM-сигнатурой. нижнем регистре -def <имя> задать символ условной компиляции -ver версия программы (только для kosdll) + -uses вывести список импортированных модулей параметр -nochk задается в виде строки из символов: "p" - указатели @@ -358,7 +359,7 @@ Oberon-реализациях выполнение такой операции con_exit: PROCEDURE [stdcall] (bCloseWindow: BOOLEAN); В KolibriOS импортировать процедуры можно только из библиотек, размещенных - в /rd/1/lib. Импортировать и вызывать функции инициализации библиотек + в /sys/lib. Импортировать и вызывать функции инициализации библиотек (lib_init, START) при этом не нужно. Для Linux, импортированные процедуры не реализованы. diff --git a/programs/develop/oberon07/lib/KolibriOS/ColorDlg.ob07 b/programs/develop/oberon07/lib/KolibriOS/ColorDlg.ob07 index 584b15b3c3..23c74e383b 100644 --- a/programs/develop/oberon07/lib/KolibriOS/ColorDlg.ob07 +++ b/programs/develop/oberon07/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/programs/develop/oberon07/lib/KolibriOS/ConsoleLib.ob07 b/programs/develop/oberon07/lib/KolibriOS/ConsoleLib.ob07 index 74346a692c..b1b1f2ac2c 100644 --- a/programs/develop/oberon07/lib/KolibriOS/ConsoleLib.ob07 +++ b/programs/develop/oberon07/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/programs/develop/oberon07/lib/KolibriOS/Debug.ob07 b/programs/develop/oberon07/lib/KolibriOS/Debug.ob07 index daaf40ece1..c7f98638e1 100644 --- a/programs/develop/oberon07/lib/KolibriOS/Debug.ob07 +++ b/programs/develop/oberon07/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/programs/develop/oberon07/lib/KolibriOS/KOSAPI.ob07 b/programs/develop/oberon07/lib/KolibriOS/KOSAPI.ob07 index 84a881bbaf..699e7a7a97 100644 --- a/programs/develop/oberon07/lib/KolibriOS/KOSAPI.ob07 +++ b/programs/develop/oberon07/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/programs/develop/oberon07/lib/KolibriOS/OpenDlg.ob07 b/programs/develop/oberon07/lib/KolibriOS/OpenDlg.ob07 index 819d34dc70..79cfcea223 100644 --- a/programs/develop/oberon07/lib/KolibriOS/OpenDlg.ob07 +++ b/programs/develop/oberon07/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/programs/develop/oberon07/lib/KolibriOS/RasterWorks.ob07 b/programs/develop/oberon07/lib/KolibriOS/RasterWorks.ob07 index 5c804aa180..672b50b3c7 100644 --- a/programs/develop/oberon07/lib/KolibriOS/RasterWorks.ob07 +++ b/programs/develop/oberon07/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/programs/develop/oberon07/lib/KolibriOS/UnixTime.ob07 b/programs/develop/oberon07/lib/KolibriOS/UnixTime.ob07 index 0e6ed5bd6d..1cca6ea551 100644 --- a/programs/develop/oberon07/lib/KolibriOS/UnixTime.ob07 +++ b/programs/develop/oberon07/lib/KolibriOS/UnixTime.ob07 @@ -1,64 +1,64 @@ -(* - BSD 2-Clause License - - Copyright (c) 2018-2019, Anton Krotov - All rights reserved. -*) - -MODULE UnixTime; - - -VAR - - days: ARRAY 12, 31, 2 OF INTEGER; - - -PROCEDURE init; -VAR - i, j, k, n0, n1: INTEGER; -BEGIN - - FOR i := 0 TO 11 DO - FOR j := 0 TO 30 DO - days[i, j, 0] := 0; - days[i, j, 1] := 0; - END - END; - - days[ 1, 28, 0] := -1; - - FOR k := 0 TO 1 DO - days[ 1, 29, k] := -1; - days[ 1, 30, k] := -1; - days[ 3, 30, k] := -1; - days[ 5, 30, k] := -1; - days[ 8, 30, k] := -1; - days[10, 30, k] := -1; - END; - - n0 := 0; - n1 := 0; - FOR i := 0 TO 11 DO - FOR j := 0 TO 30 DO - IF days[i, j, 0] = 0 THEN - days[i, j, 0] := n0; - INC(n0) - END; - IF days[i, j, 1] = 0 THEN - days[i, j, 1] := n1; - INC(n1) - END - END - END - -END init; - - -PROCEDURE time* (year, month, day, hour, min, sec: INTEGER): INTEGER; - RETURN ((year - 1970) * 365 + days[month - 1, day - 1, ORD(year DIV 4 = 0)] + (year - 1969) DIV 4) * 86400 + hour * 3600 + min * 60 + sec -END time; - - -BEGIN - init +(* + BSD 2-Clause License + + Copyright (c) 2018-2019, Anton Krotov + All rights reserved. +*) + +MODULE UnixTime; + + +VAR + + days: ARRAY 12, 31, 2 OF INTEGER; + + +PROCEDURE init; +VAR + i, j, k, n0, n1: INTEGER; +BEGIN + + FOR i := 0 TO 11 DO + FOR j := 0 TO 30 DO + days[i, j, 0] := 0; + days[i, j, 1] := 0; + END + END; + + days[ 1, 28, 0] := -1; + + FOR k := 0 TO 1 DO + days[ 1, 29, k] := -1; + days[ 1, 30, k] := -1; + days[ 3, 30, k] := -1; + days[ 5, 30, k] := -1; + days[ 8, 30, k] := -1; + days[10, 30, k] := -1; + END; + + n0 := 0; + n1 := 0; + FOR i := 0 TO 11 DO + FOR j := 0 TO 30 DO + IF days[i, j, 0] = 0 THEN + days[i, j, 0] := n0; + INC(n0) + END; + IF days[i, j, 1] = 0 THEN + days[i, j, 1] := n1; + INC(n1) + END + END + END + +END init; + + +PROCEDURE time* (year, month, day, hour, min, sec: INTEGER): INTEGER; + RETURN ((year - 1970) * 365 + days[month - 1, day - 1, ORD(year DIV 4 = 0)] + (year - 1969) DIV 4) * 86400 + hour * 3600 + min * 60 + sec +END time; + + +BEGIN + init END UnixTime. \ No newline at end of file diff --git a/programs/develop/oberon07/lib/KolibriOS/libimg.ob07 b/programs/develop/oberon07/lib/KolibriOS/libimg.ob07 index 35e9f5dd57..0ff0c59938 100644 --- a/programs/develop/oberon07/lib/KolibriOS/libimg.ob07 +++ b/programs/develop/oberon07/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/programs/develop/oberon07/samples/Dialogs.ob07 b/programs/develop/oberon07/samples/Dialogs.ob07 index 9ba66c67d5..70cf75e6db 100644 --- a/programs/develop/oberon07/samples/Dialogs.ob07 +++ b/programs/develop/oberon07/samples/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