CEdit: bugfix

git-svn-id: svn://kolibrios.org@9913 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Anton Krotov 2023-04-13 19:16:45 +00:00
parent 21c201190a
commit d23a080c99
7 changed files with 25 additions and 18 deletions

Binary file not shown.

View File

@ -28,7 +28,7 @@ IMPORT
RW, Ini, EB := EditBox, Tabs, Toolbar, SB := StatusBar;
CONST
HEADER = "CEdit (29-mar-2023)";
HEADER = "CEdit (13-apr-2023)";
ShellFilter = "";
EditFilter = "sh|inc|txt|asm|ob07|c|cpp|h|pas|pp|lua|ini|json";

View File

@ -1,5 +1,5 @@
(*
Copyright 2016, 2017, 2020-2022 Anton Krotov
Copyright 2016, 2017, 2020-2023 Anton Krotov
This file is part of CEdit.
@ -24,6 +24,7 @@ IMPORT SYSTEM, KOSAPI, Encodings;
CONST
MAX_LENGTH = 1024;
libName = "box_lib.obj";
TYPE
@ -49,10 +50,10 @@ TYPE
END;
PROCEDURE [stdcall, "box_lib.obj", "edit_box_draw"] draw* (eb: tEditBox); END;
PROCEDURE [stdcall, "box_lib.obj", "edit_box_mouse"] mouse* (eb: tEditBox); END;
PROCEDURE [stdcall, "box_lib.obj", "edit_box_set_text"] set_text (eb: tEditBox; text: INTEGER); END;
PROCEDURE [stdcall, "box_lib.obj", "edit_box_key_safe"] key* (eb: tEditBox; key: INTEGER); END;
PROCEDURE [stdcall, libName, "edit_box_draw"] draw* (eb: tEditBox); END;
PROCEDURE [stdcall, libName, "edit_box_mouse"] mouse* (eb: tEditBox); END;
PROCEDURE [stdcall, libName, "edit_box_set_text"] set_text (eb: tEditBox; text: INTEGER); END;
PROCEDURE [stdcall, libName, "edit_box_key_safe"] key* (eb: tEditBox; key: INTEGER); END;
PROCEDURE get* (text: tEditBox; VAR str: ARRAY OF CHAR);
VAR

View File

@ -24,6 +24,8 @@ IMPORT
CONST
fileName = "/sys/Icons16.png";
libName = "libimg.obj";
SIZE* = 18;
icoNew *= 0;
@ -38,9 +40,9 @@ CONST
NumberOfIcons = 8;
PROCEDURE [stdcall, "libimg.obj", ""] img_decode (data, size, options: INTEGER): INTEGER; END;
PROCEDURE [stdcall, "Libimg.obj", ""] img_convert (src, dst, dst_type, flags, param: INTEGER): INTEGER; END;
PROCEDURE [stdcall, "Libimg.obj", ""] img_destroy (img: INTEGER); END;
PROCEDURE [stdcall, libName, ""] img_decode (data, size, options: INTEGER): INTEGER; END;
PROCEDURE [stdcall, libName, ""] img_convert (src, dst, dst_type, flags, param: INTEGER): INTEGER; END;
PROCEDURE [stdcall, libName, ""] img_destroy (img: INTEGER); END;
PROCEDURE GetImg (ptr, size: INTEGER): INTEGER;

View File

@ -27,6 +27,7 @@ IMPORT
CONST
fileName = "cedit.ini";
libName = "libini.obj";
MAX_LEN = 32;
MAX_SECTIONS* = 10;
@ -57,11 +58,11 @@ VAR
lineNumbers*, autoIndents*, autoBrackets*, trimSpace*: BOOLEAN;
PROCEDURE [stdcall, "libini.obj", "ini_get_color"] get_color (f_name: RW.tFileName; sec_name: tASCIISectionName; key_name: tString; def_val: INTEGER): INTEGER; END;
PROCEDURE [stdcall, "libini.obj", "ini_get_int"] get_int (f_name: RW.tFileName; sec_name: tASCIISectionName; key_name: tString; def_val: INTEGER): INTEGER; END;
PROCEDURE [stdcall, "libini.obj", "ini_get_str"] get_str (f_name, sec_name, key_name, buffer, buf_len, def_val: INTEGER): INTEGER; END;
PROCEDURE [stdcall, "libini.obj", "ini_enum_sections"] enum_sections (f_name: RW.tFileName; callback: INTEGER); END;
PROCEDURE [stdcall-, "libini.obj", "ini_set_int"] set_int (f_name, sec_name, key_name, val: INTEGER): INTEGER; END;
PROCEDURE [stdcall, libName, "ini_get_color"] get_color (f_name: RW.tFileName; sec_name: tASCIISectionName; key_name: tString; def_val: INTEGER): INTEGER; END;
PROCEDURE [stdcall, libName, "ini_get_int"] get_int (f_name: RW.tFileName; sec_name: tASCIISectionName; key_name: tString; def_val: INTEGER): INTEGER; END;
PROCEDURE [stdcall, libName, "ini_get_str"] get_str (f_name, sec_name, key_name, buffer, buf_len, def_val: INTEGER): INTEGER; END;
PROCEDURE [stdcall, libName, "ini_enum_sections"] enum_sections (f_name: RW.tFileName; callback: INTEGER); END;
PROCEDURE [stdcall-, libName, "ini_set_int"] set_int (f_name, sec_name, key_name, val: INTEGER): INTEGER; END;
PROCEDURE getColor (key: tString; def: INTEGER): INTEGER;
RETURN get_color(IniFileName, curSection, key, def)

View File

@ -1,5 +1,5 @@
(*
Copyright 2016, 2018, 2020-2022 Anton Krotov
Copyright 2016, 2018, 2020-2023 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
@ -24,6 +24,8 @@ CONST
tsave* = 1;
tdir* = 2;
libName = "proc_lib.obj";
TYPE
DRAW_WINDOW = PROCEDURE;
@ -62,8 +64,8 @@ VAR
filter_area: tFilterArea;
PROCEDURE [stdcall, "proc_lib.obj", ""] OpenDialog_init (od: Dialog); END;
PROCEDURE [stdcall, "proc_lib.obj", ""] OpenDialog_start (od: Dialog); END;
PROCEDURE [stdcall, libName, ""] OpenDialog_init (od: Dialog); END;
PROCEDURE [stdcall, libName, ""] OpenDialog_start (od: Dialog); END;
PROCEDURE Show*(od: Dialog; Width, Height: INTEGER);
BEGIN

View File

@ -2957,7 +2957,8 @@ BEGIN
text.enc := E.CP866;
text.eol := E.EOL_CRLF;
SetPos(text, 0, 0);
resetSelect(text)
resetSelect(text);
Comments(text)
RETURN text
END New;