[CEdit, FB2 Reader, Oberon07]: fix path

git-svn-id: svn://kolibrios.org@9577 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Anton Krotov 2022-01-05 20:32:53 +00:00
parent 31c56c9a2c
commit bbdc08fc59
20 changed files with 115 additions and 108 deletions

Binary file not shown.

Binary file not shown.

View File

@ -28,7 +28,7 @@ IMPORT
RW, Ini, EB := EditBox, Tabs, Toolbar, SB := StatusBar; RW, Ini, EB := EditBox, Tabs, Toolbar, SB := StatusBar;
CONST CONST
HEADER = "CEdit (02-jan-2022)"; HEADER = "CEdit (05-jan-2022)";
ShellFilter = ""; ShellFilter = "";
EditFilter = "SH|INC|TXT|ASM|OB07|C|CPP|H|PAS|PP|LUA|INI|JSON"; EditFilter = "SH|INC|TXT|ASM|OB07|C|CPP|H|PAS|PP|LUA|INI|JSON";
@ -568,7 +568,7 @@ BEGIN
temp := "'CEdit: "; temp := "'CEdit: ";
U.append8(temp, s); U.append8(temp, s);
U.append8(temp, "' -E"); U.append8(temp, "' -E");
K.Run("/rd/1/@notify", temp) K.Run("/sys/@notify", temp)
END error; END error;
@ -928,7 +928,7 @@ END goto;
PROCEDURE Script (script: ARRAY OF CHAR); PROCEDURE Script (script: ARRAY OF CHAR);
BEGIN BEGIN
IF script # "" THEN IF script # "" THEN
K.Run("/rd/1/@open", script) K.Run("/sys/@open", script)
END END
END Script; END Script;
@ -1143,7 +1143,7 @@ BEGIN
|menuClose: |menuClose:
closeFile(TRUE, curText) closeFile(TRUE, curText)
|menuFolder: |menuFolder:
K.Run("/rd/1/File Managers/Eolite", text.fileName) K.Run("/sys/File Managers/Eolite", text.fileName)
|menuExit: |menuExit:
Close Close
|menuUndo: |menuUndo:
@ -1220,13 +1220,13 @@ BEGIN
|menuCR: |menuCR:
T.setEol(text, RW.EOL_CR) T.setEol(text, RW.EOL_CR)
|menuPipet: |menuPipet:
K.Run("/rd/1/develop/pipet", "") K.Run("/sys/develop/pipet", "")
|menuMagnify: |menuMagnify:
K.Run("/rd/1/magnify", "") K.Run("/sys/magnify", "")
|menuBoard: |menuBoard:
K.Run("/rd/1/develop/board", "") K.Run("/sys/develop/board", "")
|menuSysFunc: |menuSysFunc:
K.Run("/rd/1/docpack", "f") K.Run("/sys/docpack", "f")
|menuColors..menuMaxColors: |menuColors..menuMaxColors:
Ini.selectSection(IPC[2] - menuColors) Ini.selectSection(IPC[2] - menuColors)
|menuMoveUp: |menuMoveUp:
@ -2034,7 +2034,7 @@ BEGIN
Ini.getSettings(buildScript, runScript, debugScript); Ini.getSettings(buildScript, runScript, debugScript);
IF fileName = "" THEN IF fileName = "" THEN
text := T.New(); text := T.New();
filePath := "/rd/1" filePath := "/sys"
ELSE ELSE
text := T.open(fileName, err); text := T.open(fileName, err);
IF text = NIL THEN IF text = NIL THEN

View File

@ -1,5 +1,5 @@
(* (*
Copyright 2016, 2017, 2020, 2021 Anton Krotov Copyright 2016, 2017, 2020-2022 Anton Krotov
This file is part of CEdit. This file is part of CEdit.
@ -142,7 +142,7 @@ PROCEDURE main;
VAR VAR
Lib: INTEGER; Lib: INTEGER;
BEGIN BEGIN
Lib := KOSAPI.LoadLib("/rd/1/lib/box_lib.obj"); Lib := KOSAPI.LoadLib("/sys/lib/box_lib.obj");
ASSERT(Lib # 0); ASSERT(Lib # 0);
GetProc(Lib, SYSTEM.ADR(paint), "edit_box"); GetProc(Lib, SYSTEM.ADR(paint), "edit_box");
GetProc(Lib, SYSTEM.ADR(key_proc), "edit_box_key"); GetProc(Lib, SYSTEM.ADR(key_proc), "edit_box_key");

View File

@ -1,5 +1,5 @@
(* (*
Copyright 2021 Anton Krotov Copyright 2021, 2022 Anton Krotov
This file is part of CEdit. This file is part of CEdit.
@ -23,7 +23,7 @@ IMPORT
LibImg, K := KolibriOS, Graph, SYSTEM; LibImg, K := KolibriOS, Graph, SYSTEM;
CONST CONST
fileName = "/rd/1/Icons16.png"; fileName = "/sys/Icons16.png";
SIZE* = 18; SIZE* = 18;
VAR VAR

View File

@ -1,5 +1,5 @@
(* (*
Copyright 2021 Anton Krotov Copyright 2021, 2022 Anton Krotov
This file is part of CEdit. This file is part of CEdit.
@ -183,10 +183,10 @@ BEGIN
Utils.append8(IniFileName, fileName); Utils.append8(IniFileName, fileName);
IF ~File.Exists(IniFileName) THEN IF ~File.Exists(IniFileName) THEN
IniFileName := "/rd/1/settings/cedit.ini" IniFileName := "/sys/settings/cedit.ini"
END; 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_color), "ini_get_color");
GetProc(Lib, SYSTEM.ADR(get_int), "ini_get_int"); GetProc(Lib, SYSTEM.ADR(get_int), "ini_get_int");
GetProc(Lib, SYSTEM.ADR(get_str), "ini_get_str"); GetProc(Lib, SYSTEM.ADR(get_str), "ini_get_str");

View File

@ -1,7 +1,7 @@
(* (*
BSD 2-Clause License BSD 2-Clause License
Copyright (c) 2018-2019, Anton Krotov Copyright (c) 2018-2019, 2022 Anton Krotov
All rights reserved. All rights reserved.
*) *)
@ -338,8 +338,10 @@ END GetStr;
PROCEDURE [stdcall] dll_Load* (import_table: INTEGER): INTEGER; PROCEDURE [stdcall] dll_Load* (import_table: INTEGER): INTEGER;
CONST
path = "/sys/lib/";
VAR VAR
imp, lib, exp, proc, res: INTEGER; imp, lib, exp, proc, res, pathLen: INTEGER;
fail, done: BOOLEAN; fail, done: BOOLEAN;
procname, libname: STRING; procname, libname: STRING;
@ -348,12 +350,13 @@ BEGIN
fail := FALSE; fail := FALSE;
done := FALSE; done := FALSE;
res := 0; res := 0;
libname := "/rd/1/lib/"; libname := path;
pathLen := LENGTH(libname);
REPEAT REPEAT
SYSTEM.GET(import_table, imp); SYSTEM.GET(import_table, imp);
IF imp # 0 THEN IF imp # 0 THEN
SYSTEM.GET(import_table + 4, lib); SYSTEM.GET(import_table + 4, lib);
GetStr(lib, 10, libname); GetStr(lib, pathLen, libname);
exp := sysfunc3(68, 19, SYSTEM.ADR(libname[0])); exp := sysfunc3(68, 19, SYSTEM.ADR(libname[0]));
fail := exp = 0; fail := exp = 0;
ELSE ELSE

View File

@ -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 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 it under the terms of the GNU Lesser General Public License as published by
@ -130,7 +130,7 @@ BEGIN
res.status := 0; res.status := 0;
res.procinfo := sys.ADR(res.procinf[0]); res.procinfo := sys.ADR(res.procinf[0]);
res.com_area_name := sys.ADR(res.s_com_area_name[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.opendir_path := sys.ADR(res.s_opendir_path[0]);
res.dir_default_path := sys.ADR(res.s_dir_default_path[0]); res.dir_default_path := sys.ADR(res.s_dir_default_path[0]);
res.openfile_path := sys.ADR(res.FilePath[0]); res.openfile_path := sys.ADR(res.FilePath[0]);
@ -163,7 +163,7 @@ VAR Lib: INTEGER;
END GetProc; END GetProc;
BEGIN 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_init), "OpenDialog_init");
GetProc(Lib, sys.ADR(Dialog_start), "OpenDialog_start"); GetProc(Lib, sys.ADR(Dialog_start), "OpenDialog_start");
END Load; END Load;

View File

@ -1,5 +1,5 @@
(* (*
Copyright 2016, 2021 Anton Krotov Copyright 2016, 2021, 2022 Anton Krotov
This file is part of CEdit. This file is part of CEdit.
@ -107,7 +107,7 @@ VAR Lib: INTEGER;
END GetProc; END GetProc;
BEGIN 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_decode), "img_decode");
GetProc(Lib, SYSTEM.ADR(img_destroy), "img_destroy"); GetProc(Lib, SYSTEM.ADR(img_destroy), "img_destroy");
GetProc(Lib, SYSTEM.ADR(img_to_rgb2), "img_to_rgb2"); GetProc(Lib, SYSTEM.ADR(img_to_rgb2), "img_to_rgb2");

View File

@ -31,6 +31,7 @@ UTF-8 с BOM-сигнатурой.
нижнем регистре нижнем регистре
-def <имя> задать символ условной компиляции -def <имя> задать символ условной компиляции
-ver <major.minor> версия программы (только для kosdll) -ver <major.minor> версия программы (только для kosdll)
-uses вывести список импортированных модулей
параметр -nochk задается в виде строки из символов: параметр -nochk задается в виде строки из символов:
"p" - указатели "p" - указатели
@ -358,7 +359,7 @@ Oberon-реализациях выполнение такой операции
con_exit: PROCEDURE [stdcall] (bCloseWindow: BOOLEAN); con_exit: PROCEDURE [stdcall] (bCloseWindow: BOOLEAN);
В KolibriOS импортировать процедуры можно только из библиотек, размещенных В KolibriOS импортировать процедуры можно только из библиотек, размещенных
в /rd/1/lib. Импортировать и вызывать функции инициализации библиотек в /sys/lib. Импортировать и вызывать функции инициализации библиотек
(lib_init, START) при этом не нужно. (lib_init, START) при этом не нужно.
Для Linux, импортированные процедуры не реализованы. Для Linux, импортированные процедуры не реализованы.

View File

@ -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 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 it under the terms of the GNU Lesser General Public License as published by
@ -65,7 +65,7 @@ BEGIN
res.color_type := 0; res.color_type := 0;
res.procinfo := sys.ADR(res.procinf[0]); res.procinfo := sys.ADR(res.procinf[0]);
res.com_area_name := sys.ADR(res.s_com_area_name[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.draw_window := draw_window;
res.status := 0; res.status := 0;
res.X := 0; res.X := 0;
@ -95,7 +95,7 @@ VAR Lib: INTEGER;
END GetProc; END GetProc;
BEGIN 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_init), "ColorDialog_init");
GetProc(Lib, sys.ADR(Dialog_start), "ColorDialog_start"); GetProc(Lib, sys.ADR(Dialog_start), "ColorDialog_start");
END Load; END Load;

View File

@ -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 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 it under the terms of the GNU Lesser General Public License as published by
@ -75,7 +75,7 @@ VAR Lib: INTEGER;
END GetProc; END GetProc;
BEGIN BEGIN
Lib := KOSAPI.LoadLib("/rd/1/lib/Console.obj"); Lib := KOSAPI.LoadLib("/sys/lib/Console.obj");
ASSERT(Lib # 0); ASSERT(Lib # 0);
GetProc(Lib, sys.ADR(version), "version"); GetProc(Lib, sys.ADR(version), "version");
GetProc(Lib, sys.ADR(init), "con_init"); GetProc(Lib, sys.ADR(init), "con_init");

View File

@ -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 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 it under the terms of the GNU Lesser General Public License as published by
@ -285,7 +285,7 @@ BEGIN
info.param := sys.SADR(" "); info.param := sys.SADR(" ");
info.rsrvd1 := 0; info.rsrvd1 := 0;
info.rsrvd2 := 0; info.rsrvd2 := 0;
info.fname := "/rd/1/develop/board"; info.fname := "/sys/develop/board";
res := KOSAPI.sysfunc2(70, sys.ADR(info)) res := KOSAPI.sysfunc2(70, sys.ADR(info))
END Open; END Open;

View File

@ -1,7 +1,7 @@
(* (*
BSD 2-Clause License BSD 2-Clause License
Copyright (c) 2018-2019, Anton Krotov Copyright (c) 2018-2019, 2022 Anton Krotov
All rights reserved. All rights reserved.
*) *)
@ -338,8 +338,10 @@ END GetStr;
PROCEDURE [stdcall] dll_Load* (import_table: INTEGER): INTEGER; PROCEDURE [stdcall] dll_Load* (import_table: INTEGER): INTEGER;
CONST
path = "/sys/lib/";
VAR VAR
imp, lib, exp, proc, res: INTEGER; imp, lib, exp, proc, res, pathLen: INTEGER;
fail, done: BOOLEAN; fail, done: BOOLEAN;
procname, libname: STRING; procname, libname: STRING;
@ -348,12 +350,13 @@ BEGIN
fail := FALSE; fail := FALSE;
done := FALSE; done := FALSE;
res := 0; res := 0;
libname := "/rd/1/lib/"; libname := path;
pathLen := LENGTH(libname);
REPEAT REPEAT
SYSTEM.GET(import_table, imp); SYSTEM.GET(import_table, imp);
IF imp # 0 THEN IF imp # 0 THEN
SYSTEM.GET(import_table + 4, lib); SYSTEM.GET(import_table + 4, lib);
GetStr(lib, 10, libname); GetStr(lib, pathLen, libname);
exp := sysfunc3(68, 19, SYSTEM.ADR(libname[0])); exp := sysfunc3(68, 19, SYSTEM.ADR(libname[0]));
fail := exp = 0; fail := exp = 0;
ELSE ELSE

View File

@ -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 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 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.filter_area.size := LENGTH(res.filter_area.filter);
res.procinfo := sys.ADR(res.procinf[0]); res.procinfo := sys.ADR(res.procinf[0]);
res.com_area_name := sys.ADR(res.s_com_area_name[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.opendir_path := sys.ADR(res.s_opendir_path[0]);
res.dir_default_path := sys.ADR(res.s_dir_default_path[0]); res.dir_default_path := sys.ADR(res.s_dir_default_path[0]);
res.openfile_path := sys.ADR(res.FilePath[0]); res.openfile_path := sys.ADR(res.FilePath[0]);
@ -148,7 +148,7 @@ VAR Lib: INTEGER;
END GetProc; END GetProc;
BEGIN 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_init), "OpenDialog_init");
GetProc(Lib, sys.ADR(Dialog_start), "OpenDialog_start"); GetProc(Lib, sys.ADR(Dialog_start), "OpenDialog_start");
END Load; END Load;

View File

@ -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 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 it under the terms of the GNU Lesser General Public License as published by
@ -110,7 +110,7 @@ VAR Lib: INTEGER;
END GetProc; END GetProc;
BEGIN BEGIN
Lib := KOSAPI.LoadLib("/rd/1/lib/RasterWorks.obj"); Lib := KOSAPI.LoadLib("/sys/lib/RasterWorks.obj");
ASSERT(Lib # 0); ASSERT(Lib # 0);
GetProc(Lib, sys.ADR(drawText), "drawText"); GetProc(Lib, sys.ADR(drawText), "drawText");
GetProc(Lib, sys.ADR(cntUTF_8), "cntUTF-8"); GetProc(Lib, sys.ADR(cntUTF_8), "cntUTF-8");

View File

@ -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 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 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; END GetProc;
BEGIN BEGIN
Lib := KOSAPI.LoadLib("/rd/1/lib/libimg.obj"); Lib := KOSAPI.LoadLib("/sys/lib/libimg.obj");
ASSERT(Lib # 0); ASSERT(Lib # 0);
GetProc(Lib, sys.ADR(img_is_img) , "img_is_img"); GetProc(Lib, sys.ADR(img_is_img) , "img_is_img");
GetProc(Lib, sys.ADR(img_to_rgb) , "img_to_rgb"); GetProc(Lib, sys.ADR(img_to_rgb) , "img_to_rgb");

View File

@ -85,7 +85,7 @@ BEGIN
back_color := 00FFFFFFH; back_color := 00FFFFFFH;
header := "Dialogs"; header := "Dialogs";
draw_window; 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); Color := ColorDlg.Create(draw_window);
WHILE TRUE DO WHILE TRUE DO
CASE WaitForEvent() OF CASE WaitForEvent() OF