fix load syntax files from CD

git-svn-id: svn://kolibrios.org@8852 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2021-06-14 14:52:00 +00:00
parent 75fe8b68da
commit b7f963f4e3
3 changed files with 13 additions and 9 deletions

View File

@ -984,7 +984,6 @@ edit_box_key.sh_n:
edit_box_key.sh_n1:
call edit_box.check_offset
call edit_box.get_n
mov edx,eax ;size of ed_box
mov ecx,ed_offset
add eax,ecx ;eax = w_off= ed_offset+width
mov edx,eax ;save
@ -1223,8 +1222,7 @@ edit_box_key.clear_bg:
jb @f
mov eax,ed_pos
sub ebx,eax
mov ecx,ed_offset
sub eax,ecx
sub eax,ed_offset
jmp edit_box_key.nxt
@@: mov ebx,ed_pos
@ -1232,8 +1230,7 @@ edit_box_key.clear_bg:
sub eax,ebx
mov ebx,eax ;It is not optimal
pop eax ;ed_pos
mov ecx,ed_offset
sub eax,ecx
sub eax,ed_offset
edit_box_key.nxt:
mov ebp,eax ;¯à®¢¥àª  ­  ¢ë室 § ªà è¨¢ ¥¬®© ®¡« á⨠§  ¯à¥¤¥«ë ¤«¨­ë
add ebp,ebx

View File

@ -762,13 +762,12 @@ proc ted_init_syntax_file, edit:dword
;init: ted_colors_text_count, ted_key_words_count, ...
mov ted_colors_text_count,1
mov ted_key_words_count,0
mov ted_help_text_f1,0
mov ted_help_id,-1 ;¨¤¥­â¨ä¨ª â®à á«®¢  ¤«ï á¯à ¢ª¨
mov eax,edi ;á®å࠭塞 §­ ç¥­¨¥ edi
mov esi,ted_syntax_file
add edi,ted_offs_count_colors
add edi,ted_offs_count_colors ;edi = &ted_key_words_count
mov ecx,9
rep movsd
mov edi,eax ;¢®áâ ­ ¢«¨¢ ¥¬ §­ ç¥­¨¥ edi
@ -783,6 +782,8 @@ proc ted_init_syntax_file, edit:dword
mov ted_key_words_data,eax
mov ecx,ted_key_words_count ;init: ted_arr_key_pos (first key positions)
or ecx,ecx
jz .no_words
xor eax,eax
@@:
ColToIndexOffset eax,edx
@ -795,6 +796,7 @@ proc ted_init_syntax_file, edit:dword
.no_ch_key:
inc eax
loop @b
.no_words:
;init: ted_help_text_f1
mov ecx,ted_key_words_count ;ª®«¨ç¥á⢮ ª«î祢ëå á«®¢

View File

@ -96,10 +96,15 @@ mov ebp,lib0
mov dword[tree1.data_img],eax
;------------------------------------------------------------------------------
copy_path fn_syntax_dir,sys_path,file_name,0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ ᨭ⠪á¨á 
xor eax,eax
mov ecx,4096
mov edi,file_name
repnz scasb
mov byte[edi-2],al ;㡨ࠥ¬ '/' ¢ ª®­æ¥ ¨¬¥­¨ ¯ ¯ª¨ (­ã¦­® ¤«ï ç⥭¨ï á CD)
mcall SF_FILE,tree_file_struct
cmp ebx,0
jle .end_dir_init
or ebx,ebx
jz .end_dir_init
mov eax,dir_mem+32+40
mov ecx,ebx
@@: