/programs/develop/cedit/CEDIT |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programs/develop/cedit/SRC/CEdit.ob07 |
---|
28,7 → 28,7 |
RW, Ini, EB := EditBox, Tabs, Toolbar, SB := StatusBar; |
CONST |
HEADER = "CEdit (24-feb-2023)"; |
HEADER = "CEdit (26-feb-2023)"; |
ShellFilter = ""; |
EditFilter = "sh|inc|txt|asm|ob07|c|cpp|h|pas|pp|lua|ini|json"; |
/programs/develop/cedit/SRC/ChangeLog.ob07 |
---|
35,9 → 35,8 |
map: SET; |
data: ARRAY boolItemSize OF |
RECORD |
line: Lines.tLine; |
adr: INTEGER; |
val, save: BOOLEAN |
adr1, adr2: INTEGER; |
val1, val2, save: BOOLEAN |
END |
END; |
124,7 → 123,8 |
ELSIF item IS tBoolItem THEN |
FOR i := 0 TO boolItemSize - 1 DO |
IF i IN item(tBoolItem).map THEN |
SYSTEM.PUT(item(tBoolItem).data[i].adr, item(tBoolItem).data[i].val) |
SYSTEM.PUT(item(tBoolItem).data[i].adr1, item(tBoolItem).data[i].val1); |
SYSTEM.PUT(item(tBoolItem).data[i].adr2, item(tBoolItem).data[i].val2) |
END |
END |
END |
152,6 → 152,7 |
boolItem: tBoolItem; |
cur: List.tItem; |
i: INTEGER; |
line_modified: BOOLEAN; |
BEGIN |
item := CL.Log.first; |
WHILE item # NIL DO |
167,11 → 168,13 |
IF cur IS tBoolItem THEN |
boolItem := cur(tBoolItem); |
FOR i := 0 TO boolItemSize - 1 DO |
IF (i IN boolItem.map) & boolItem.data[i].save & |
boolItem.data[i].line.modified THEN |
IF (i IN boolItem.map) & boolItem.data[i].save THEN |
SYSTEM.GET(boolItem.data[i].adr1, line_modified); |
IF line_modified THEN |
EXCL(boolItem.map, i) |
END |
END |
END |
END; |
cur := cur.prev; |
IF boolItem.map = {} THEN |
244,7 → 247,8 |
boolItem := cur(tBoolItem); |
FOR i := 0 TO boolItemSize - 1 DO |
IF (i IN boolItem.map) & boolItem.data[i].save THEN |
SYSTEM.PUT(boolItem.data[i].adr, ~boolItem.data[i].val); |
SYSTEM.PUT(boolItem.data[i].adr1, ~boolItem.data[i].val1); |
SYSTEM.PUT(boolItem.data[i].adr2, ~boolItem.data[i].val2); |
EXCL(boolItem.map, i) |
END |
END |
258,13 → 262,13 |
END delCurSaved; |
PROCEDURE _changeBool (fn2: BOOLEAN; line: Lines.tLine; VAR v: BOOLEAN; x: BOOLEAN); |
PROCEDURE changeBool (save: BOOLEAN; VAR v1: BOOLEAN; x1: BOOLEAN; VAR v2: BOOLEAN; x2: BOOLEAN); |
VAR |
item: tBoolItem; |
cur: List.tItem; |
i: INTEGER; |
BEGIN |
IF fn2 THEN |
IF save THEN |
cur := CL.guard.prev |
ELSE |
IF ~CL.isLast THEN |
274,7 → 278,7 |
END; |
WHILE (cur # NIL) & ~(cur IS tGuard) & |
(~(cur IS tBoolItem) OR (cur(tBoolItem).map = fillMap)) DO |
( ~(cur IS tBoolItem) (*OR (cur(tBoolItem).map = fillMap)*) ) DO |
cur := cur.prev |
END; |
IF (cur IS tBoolItem) & (cur(tBoolItem).map # fillMap) THEN |
282,7 → 286,7 |
ELSE |
NEW(item); |
item.map := {}; |
IF fn2 THEN |
IF save THEN |
List.insert(CL.Log, CL.guard.prev, item) |
ELSE |
List.append(CL.Log, item) |
292,30 → 296,19 |
i := 0; |
WHILE i < boolItemSize DO |
IF ~(i IN item.map) THEN |
item.data[i].line := line; |
item.data[i].adr := SYSTEM.ADR(v); |
item.data[i].val := x; |
item.data[i].save := fn2; |
item.data[i].adr1 := SYSTEM.ADR(v1); |
item.data[i].val1 := x1; |
item.data[i].adr2 := SYSTEM.ADR(v2); |
item.data[i].val2 := x2; |
item.data[i].save := save; |
INCL(item.map, i); |
i := boolItemSize |
END; |
INC(i) |
END |
END _changeBool; |
PROCEDURE changeBool (line: Lines.tLine; VAR v: BOOLEAN; x: BOOLEAN); |
BEGIN |
_changeBool(FALSE, line, v, x) |
END changeBool; |
PROCEDURE changeBool2 (line: Lines.tLine; VAR v: BOOLEAN; x: BOOLEAN); |
BEGIN |
_changeBool(TRUE, line, v, x) |
END changeBool2; |
PROCEDURE changeInt* (VAR v: INTEGER; x: INTEGER); |
BEGIN |
changeWord(SYSTEM.ADR(v), SYSTEM.ADR(x)) |
421,5 → 414,5 |
BEGIN |
List.init(changeInt, changePtr); |
Lines.init(changeInt, changePtr, changeBool, changeBool2, typedPtr, untypedPtr) |
Lines.init(changeInt, changePtr, changeBool, typedPtr, untypedPtr) |
END ChangeLog. |
/programs/develop/cedit/SRC/Ini.ob07 |
---|
1,5 → 1,5 |
(* |
Copyright 2021, 2022 Anton Krotov |
Copyright 2021-2023 Anton Krotov |
This file is part of CEdit. |
21,7 → 21,7 |
IMPORT |
SYSTEM, RW, Text, Utils, File, List, Languages, KolibriOS, Lines; |
SYSTEM, RW, Text, Utils, File, List, Languages, Lines; |
CONST |
167,11 → 167,11 |
autoBrackets := get_int(IniFileName, "settings", "auto_brackets", 0) # 0; |
trimSpace := get_int(IniFileName, "settings", "trim_space", 1) # 0; |
font := get_int(IniFileName, "settings", "font", 1); |
IF ~((0 <= font) & (font <= 2)) THEN |
IF (font < 0) OR (font > 2) THEN |
font := 1 |
END; |
theme := get_int(IniFileName, "settings", "theme", 0); |
IF ~((0 <= theme) & (theme <= sections.count - 1)) THEN |
IF (theme < 0) OR (theme >= sections.count) THEN |
theme := 0 |
END; |
getStr("settings", "build", buildScript); |
/programs/develop/cedit/SRC/Lines.ob07 |
---|
1,5 → 1,5 |
(* |
Copyright 2021, 2022 Anton Krotov |
Copyright 2021-2023 Anton Krotov |
This file is part of CEdit. |
39,7 → 39,7 |
END; |
PmovInt = PROCEDURE (VAR v: INTEGER; x: INTEGER); |
PmovBool = PROCEDURE (line: tLine; VAR v: BOOLEAN; x: BOOLEAN); |
PmovBool = PROCEDURE (save: BOOLEAN; VAR v1: BOOLEAN; x1: BOOLEAN; VAR v2: BOOLEAN; x2: BOOLEAN); |
PmovPtr = PROCEDURE (VAR v: List.tItem; x: List.tItem); |
PTypedPtr = PROCEDURE (p: List.tItem); |
57,7 → 57,7 |
VAR |
_movInt: PmovInt; |
_movBool, _movBool2: PmovBool; |
_movBool: PmovBool; |
_movPtr: PmovPtr; |
_typedPtr: PTypedPtr; |
_untypedPtr: PUntypedPtr; |
123,18 → 123,6 |
END movInt; |
PROCEDURE movBool (line: tLine; VAR v: BOOLEAN; x: BOOLEAN); |
BEGIN |
_movBool(line, v, x) |
END movBool; |
PROCEDURE movBool2 (line: tLine; VAR v: BOOLEAN; x: BOOLEAN); |
BEGIN |
_movBool2(line, v, x) |
END movBool2; |
PROCEDURE movPtr (VAR v: List.tItem; x: List.tItem); |
BEGIN |
_movPtr(v, x) |
206,8 → 194,7 |
line.modified := FALSE; |
line.saved := FALSE; |
IF ~temp THEN |
movBool(line, line.modified, FALSE); |
movBool(line, line.saved, FALSE) |
_movBool(FALSE, line.modified, FALSE, line.saved, FALSE) |
END; |
line.cin := 0; |
line.cout := 0; |
272,8 → 259,7 |
PROCEDURE save* (line: tLine); |
BEGIN |
IF ~line.temp THEN |
movBool2(line, line.saved, TRUE); |
movBool2(line, line.modified, FALSE) |
_movBool(TRUE, line.modified, FALSE, line.saved, TRUE) |
END; |
line.modified := FALSE; |
line.saved := TRUE |
451,8 → 437,7 |
PROCEDURE modify* (line: tLine); |
BEGIN |
IF ~line.temp THEN |
movBool(line, line.modified, TRUE); |
movBool(line, line.saved, FALSE) |
_movBool(FALSE, line.modified, TRUE, line.saved, FALSE) |
END; |
line.modified := TRUE; |
line.saved := FALSE; |
532,12 → 517,11 |
END convert; |
PROCEDURE init* (movInt: PmovInt; movPtr: PmovPtr; movBool, movBool2: PmovBool; typedPtr: PTypedPtr; untypedPtr: PUntypedPtr); |
PROCEDURE init* (movInt: PmovInt; movPtr: PmovPtr; movBool: PmovBool; typedPtr: PTypedPtr; untypedPtr: PUntypedPtr); |
BEGIN |
_movInt := movInt; |
_movPtr := movPtr; |
_movBool := movBool; |
_movBool2 := movBool2; |
_typedPtr := typedPtr; |
_untypedPtr := untypedPtr; |
END init; |
/programs/develop/cedit/SRC/Text.ob07 |
---|
68,7 → 68,7 |
smallChange: INTEGER; |
modified*, smallMove, |
comments, guard, fasm*, |
search, cs, whole: BOOLEAN; |
search, cs, whole, wordSel: BOOLEAN; |
edition*: tGuard; |
curLine: tLine; |
lang*: INTEGER; |
929,7 → 929,8 |
text.modified := TRUE; |
text.comments := TRUE; |
text.search := TRUE; |
text.guard := TRUE |
text.guard := TRUE; |
text.wordSel := TRUE |
END modify; |
1055,7 → 1056,8 |
setSelect(text); |
text.foundSel := 0; |
ShowCursor; |
text.CurX := -1 |
text.CurX := -1; |
text.wordSel := TRUE |
END SetPos; |
1992,6 → 1994,7 |
str: tString; |
curLine: tLine; |
BEGIN |
IF text.wordSel THEN |
curLine := text.curLine; |
IF selected(text) & (text.cursor.Y = text.select.Y) THEN |
getSelect(text, selBeg, selEnd); |
2015,7 → 2018,9 |
IF text.searchText # str THEN |
text.smallMove := FALSE |
END; |
IF search(text, str, Lang.isCS(text.lang), TRUE) THEN END |
IF search(text, str, Lang.isCS(text.lang), TRUE) THEN END; |
text.wordSel := FALSE |
END |
END wordSel; |
2495,6 → 2500,7 |
text.cs := FALSE; |
text.whole := FALSE; |
text.guard := TRUE; |
text.wordSel := FALSE; |
text.edition := NIL; |
text.foundList := List.create(NIL); |
text.searchText := ""; |