Subversion Repositories Kolibri OS

Rev

Rev 4542 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4542 Rev 4987
Line 1... Line 1...
1
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
1
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
2
; í«¥¬¥­â TextEditor ¤«ï Kolibri OS
2
; í«¥¬¥­â TextEditor ¤«ï Kolibri OS
3
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 28.01.2014 IgorA
3
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 27.06.2014 IgorA
4
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
4
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
Line 5... Line 5...
5
 
5
 
6
;input:
6
;input:
7
; edi = pointer to tedit struct
7
; edi = pointer to tedit struct
Line 1101... Line 1101...
1101
			inc eax
1101
			inc eax
1102
			mov dword[new_lin],eax
1102
			mov dword[new_lin],eax
Line 1103... Line 1103...
1103
 
1103
 
1104
			call ted_get_num_lines
1104
			call ted_get_num_lines
-
 
1105
			sub dword[new_lin],eax
-
 
1106
			;㢥«¨ç¨¢ ¥¬ «¨­¨¨ ¢ áªà®««¨­£¥ ­  ç¨á«® ¤®¡ ¢«¥­­ëå ¤®¯®«­¨â¥«ì­ëå áâப
-
 
1107
			mov ecx,ted_scr_w
1105
			sub dword[new_lin],eax
1108
			add dword[ecx+sb_offs_max_area],eax ;㢥«¨ç¨¢ ¥¬ à §¬¥à ¢¥à⨪ «ì­®£® áªà®««¨­£ 
1106
		pop eax
1109
		pop eax
Line 1107... Line 1110...
1107
	@@:
1110
	@@:
1108
 
1111
 
Line 1126... Line 1129...
1126
				;call ted_go_to_pos
1129
				;call ted_go_to_pos
1127
				cmp byte [esi],13
1130
				cmp byte [esi],13
1128
				jne .no_cur_mov
1131
				jne .no_cur_mov
1129
					mov ted_cur_x,0
1132
					mov ted_cur_x,0
1130
					inc ted_cur_y
1133
					inc ted_cur_y
-
 
1134
					;㢥«¨ç¨¢ ¥¬ «¨­¨¨ ¢ áªà®««¨­£¥ ­  ç¨á«® ¤®¡ ¢«¥­­ëå ¢ ⥪á⥠áâப
-
 
1135
					mov ecx,ted_scr_w
-
 
1136
					inc dword[ecx+sb_offs_max_area] ;㢥«¨ç¨¢ ¥¬ à §¬¥à ¢¥à⨪ «ì­®£® áªà®««¨­£ 
1131
			.no_cur_mov:
1137
			.no_cur_mov:
Line -... Line 1138...
-
 
1138
 
1132
 
1139
			; *** ¢áâ ¢ª  ⥪ã饣® ᨬ¢®«  ¨§ áâப¨ ***
1133
			mov ecx,ted_opt_ed_change_time
1140
			mov ecx,ted_opt_ed_change_time
1134
			not ecx
1141
			not ecx
Line 1135... Line 1142...
1135
			and dword[add_opt],ecx ;n_tim=false;
1142
			and dword[add_opt],ecx ;n_tim=false;
Line 1150... Line 1157...
1150
			mov ecx,[edx+6] ; *** ecx = tex[i].next ***
1157
			mov ecx,[edx+6] ; *** ecx = tex[i].next ***
1151
			imul ecx,sizeof.symbol
1158
			imul ecx,sizeof.symbol
1152
			add ecx,ted_tex ; *** ecx = tex[tex[i].next] ***
1159
			add ecx,ted_tex ; *** ecx = tex[tex[i].next] ***
1153
			mov [ecx+2],eax ;tex[tex[i].next].perv=i;
1160
			mov [ecx+2],eax ;tex[tex[i].next].perv=i;
Line -... Line 1161...
-
 
1161
 
-
 
1162
			; *** ¢áâ ¢ª  ¤®¯®«­¨â¥«ì­ëå áâப ¨ ¯à®¡¥«®¢
1154
 
1163
			; ¥á«¨ ªãàá®à ¢® ¢à¥¬ï ¢áâ ¢ª¨ ­ å®¤¨«áï §  ⥪á⮬ ***
1155
			cmp dword[new_lin],0 ;add lines or text
1164
			cmp dword[new_lin],0 ;add lines or text
1156
			jle .spc_add
1165
			jle .spc_add
1157
				dec dword[new_lin]
1166
				dec dword[new_lin]
1158
				mov byte [edx],13
1167
				mov byte [edx],13
Line 1162... Line 1171...
1162
			jle .tex_add
1171
			jle .tex_add
1163
				dec dword[new_spc]
1172
				dec dword[new_spc]
1164
				mov byte [edx],' '
1173
				mov byte [edx],' '
1165
				jmp .u1f
1174
				jmp .u1f
1166
			.tex_add:
1175
			.tex_add:
1167
			inc esi
1176
			inc esi ; ¯¥à¥å®¤ ª á«¥¤ãî饬㠢áâ ¢«ï¥¬®¬ã ᨬ¢®«ã
1168
			dec ebx
1177
			dec ebx
1169
		.u1f:
1178
		.u1f:
1170
		add edx,sizeof.symbol
1179
		add edx,sizeof.symbol
1171
		cmp edx,ted_tex_end
1180
		cmp edx,ted_tex_end
1172
		jge @f ;out of memory
1181
		jge @f ;out of memory