[Apps/Calcplus] A little bit more code polishing
Some checks failed
Build system / Check kernel codestyle (pull_request) Successful in 27s
Build system / Build (pull_request) Failing after 3m5s

This commit is contained in:
2025-04-14 19:17:28 +03:00
parent 781f7b0bbb
commit 1508ac302a

View File

@@ -182,14 +182,13 @@ ev_button:
mov [eax], cl mov [eax], cl
inc eax inc eax
jmp @b jmp @b
@@: @@:
dec [edb1.pos] dec [edb1.pos]
dec [edb1.size] dec [edb1.size]
m2m [edb1.shift], [edb1.pos] m2m [edb1.shift], [edb1.pos]
jmp .redraw jmp .redraw
.not_del: .not_del:
; CALCULATE ; CALCULATE
@@ -238,10 +237,10 @@ ev_button:
dec eax dec eax
inc [edb1.pos] inc [edb1.pos]
jmp @b jmp @b
@@: @@:
jmp .redraw jmp .redraw
.not_list: .not_list:
; KEYBOARD ; KEYBOARD
@@ -258,7 +257,7 @@ ev_button:
cmp dh, 30 cmp dh, 30
jl @f jl @f
add ebx, 2 add ebx, 2
@@: @@:
cmp ebx, ecx cmp ebx, ecx
je @f je @f
@@ -410,7 +409,7 @@ proc draw_textbox
; border ; border
mcall SF_DRAW_RECT, <LIST_X, LIST_ITEM_W>, < 8, 30>, [sc.work_graph] mcall SF_DRAW_RECT, <LIST_X, LIST_ITEM_W>, < 8, 30>, [sc.work_graph]
; background ; background
mov edx, [scn.gui_face] mov edx, [scn.gui_face]
cmp [error_n], 0 cmp [error_n], 0
@@ -454,7 +453,6 @@ proc draw_textbox
@@: @@:
invoke editbox.draw, edb1 invoke editbox.draw, edb1
ret ret
endp endp
@@ -538,7 +536,7 @@ proc draw_list
mov ecx, LIST_Y shl 16 + LIST_ITEM_H mov ecx, LIST_Y shl 16 + LIST_ITEM_H
mov edx, [sc.work_light] mov edx, [sc.work_light]
mov edi, LIST_ITEM_COUNT mov edi, LIST_ITEM_COUNT
@@: @@:
mcall mcall
; draw separator { ; draw separator {
@@ -549,7 +547,7 @@ proc draw_list
; } ; }
pop edx ecx pop edx ecx
add ecx, LIST_ITEM_H shl 16 add ecx, LIST_ITEM_H shl 16
.next: .next:
dec edi dec edi
cmp edi, 0 cmp edi, 0
@@ -626,7 +624,7 @@ proc str_len uses ebx, str
xor eax, eax xor eax, eax
mov ebx, [str] mov ebx, [str]
@@: @@:
cmp [ebx], byte 0 cmp [ebx], byte 0
je @f je @f
@@ -635,7 +633,6 @@ proc str_len uses ebx, str
jmp @b jmp @b
@@: @@:
ret ret
endp endp
@@ -655,7 +652,7 @@ proc str_cpy uses eax ebx ecx, from, to
inc eax inc eax
inc ebx inc ebx
jmp @b jmp @b
@@: @@:
mov [ebx], byte 0 mov [ebx], byte 0
ret ret
@@ -666,7 +663,7 @@ endp
if lang eq ru_RU if lang eq ru_RU
engineering_str cp866 "Инженерный режим" engineering_str cp866 "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <><E0A5A6>"
engineering_len = $ - engineering_str engineering_len = $ - engineering_str
else if lang eq es_ES else if lang eq es_ES
@@ -690,7 +687,15 @@ f70_calc:
dd 0 dd 0
db '/sys/calc', 0 db '/sys/calc', 0
; system colors internal
scn:
.gui_tb_in_shd dd 0x00CED0D0
.gui_face dd 0x00FAF8FA
.gui_text dd 0x10373C42
.gui_intext dd 0x005F5F5F
.gui_select dd 0x00C7C9C9
; ====================================================================
I_END: I_END:
@@ -718,15 +723,6 @@ txt_size rd 1
history rb 512 * LIST_ITEM_COUNT history rb 512 * LIST_ITEM_COUNT
rb 512 rb 512
struc system_colors_internal {
.gui_tb_in_shd dd 0x00CED0D0
.gui_face dd 0x00FAF8FA
.gui_text dd 0x10373C42
.gui_intext dd 0x005F5F5F
.gui_select dd 0x00C7C9C9
}
scn system_colors_internal
sc system_colors sc system_colors
MEM: MEM: