Subversion Repositories Kolibri OS

Rev

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

Rev 1464 Rev 1489
Line 1... Line 1...
1
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
1
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
2
; í«¥¬¥­â TextEditor ¤«ï Kolibri OS
2
; í«¥¬¥­â TextEditor ¤«ï Kolibri OS
3
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 17.05.2010 IgorA
3
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 09.06.2010 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 152... Line 152...
152
	push eax ecx edi
152
	push eax ecx edi
153
	mov edi,dword[edit]
153
	mov edi,dword[edit]
Line 154... Line 154...
154
 
154
 
155
	mov ecx,sizeof.symbol
155
	mov ecx,sizeof.symbol
156
	imul ecx,ted_max_chars
156
	imul ecx,ted_max_chars
157
	call mem_Alloc ;¢ë¤¥«ï¥¬ ¯ ¬ïâì
157
	invoke mem.alloc,ecx ;¢ë¤¥«ï¥¬ ¯ ¬ïâì
158
	mov ted_tex,eax
158
	mov ted_tex,eax
159
	mov ted_tex_1,eax
159
	mov ted_tex_1,eax
160
	add ted_tex_1,sizeof.symbol
160
	add ted_tex_1,sizeof.symbol
161
	add eax,ecx
161
	add eax,ecx
Line 164... Line 164...
164
	stdcall ted_clear, edi,1
164
	stdcall ted_clear, edi,1
Line 165... Line 165...
165
 
165
 
166
;-------------------------------------------------
166
;-------------------------------------------------
167
	mov ecx,1024 ;1024 - ¤«ï ¬ áᨢ  ted_arr_key_pos
167
	mov ecx,1024 ;1024 - ¤«ï ¬ áᨢ  ted_arr_key_pos
168
	add ecx,ted_syntax_file_size
168
	add ecx,ted_syntax_file_size
169
	call mem_Alloc
169
	invoke mem.alloc,ecx
170
	mov ted_arr_key_pos,eax
170
	mov ted_arr_key_pos,eax
171
	add eax,1024
171
	add eax,1024
Line 172... Line 172...
172
	mov ted_syntax_file,eax
172
	mov ted_syntax_file,eax
Line 253... Line 253...
253
 
253
 
254
align 4
254
align 4
255
proc ted_delete, edit:dword
255
proc ted_delete, edit:dword
256
	push edi
256
	push edi
257
	mov edi,dword[edit]
257
	mov edi,dword[edit]
258
	stdcall mem_Free,ted_tex
258
	invoke mem.free,ted_tex
259
	stdcall mem_Free,ted_arr_key_pos ;ted_syntax_file
259
	invoke mem.free,ted_arr_key_pos ;ted_syntax_file
260
	pop edi
260
	pop edi
261
	ret
261
	ret
Line 1202... Line 1202...
1202
		push eax ebx ecx
1202
		push eax ebx ecx
1203
		mov ecx,ted_increase_size
1203
		mov ecx,ted_increase_size
1204
		add ecx,ted_max_chars
1204
		add ecx,ted_max_chars
1205
		mov ted_max_chars,ecx
1205
		mov ted_max_chars,ecx
1206
		imul ecx,sizeof.symbol
1206
		imul ecx,sizeof.symbol
1207
		stdcall mem_ReAlloc, ted_tex,ecx
1207
		invoke mem.realloc, ted_tex,ecx
1208
		mov ebx,ted_tex
1208
		mov ebx,ted_tex
1209
		mov ted_tex,eax
1209
		mov ted_tex,eax
1210
		mov ted_tex_1,eax
1210
		mov ted_tex_1,eax
1211
		add ted_tex_1,sizeof.symbol
1211
		add ted_tex_1,sizeof.symbol
1212
			sub edx,ebx
1212
			sub edx,ebx
Line 3944... Line 3944...
3944
  stdcall ted_can_save,edi
3944
  stdcall ted_can_save,edi
3945
  cmp al,0
3945
  cmp al,0
3946
  je .no_save
3946
  je .no_save
Line 3947... Line 3947...
3947
 
3947
 
3948
  mov ecx,ted_max_chars
3948
  mov ecx,ted_max_chars
3949
  call mem_Alloc
3949
  invoke mem.alloc,ecx
Line 3950... Line 3950...
3950
  push eax ;§ ¯®¬¨­ ¥¬ 㪠§ â¥«ì ­  ¢ë¤¥«¥­­ãî ¯ ¬ïâì
3950
  push eax ;§ ¯®¬¨­ ¥¬ 㪠§ â¥«ì ­  ¢ë¤¥«¥­­ãî ¯ ¬ïâì
3951
 
3951
 
3952
  mov edx,ted_tex
3952
  mov edx,ted_tex
Line 3997... Line 3997...
3997
    .no_msg:
3997
    .no_msg:
3998
    m2m ted_tim_ls,ted_tim_ch
3998
    m2m ted_tim_ls,ted_tim_ch
3999
  @@:
3999
  @@:
Line 4000... Line 4000...
4000
 
4000
 
4001
  pop ecx ;§ ¯¨á뢠¥¬ 㪠§ â¥«ì ­  ¢ë¤¥«¥­­ãî ¯ ¬ïâì
4001
  pop ecx ;§ ¯¨á뢠¥¬ 㪠§ â¥«ì ­  ¢ë¤¥«¥­­ãî ¯ ¬ïâì
4002
  stdcall mem_Free,ecx
4002
  invoke mem.free,ecx
4003
  .no_save:
4003
  .no_save:
4004
  popad
4004
  popad
4005
  ret
4005
  ret
4006
endp
4006
endp
4007
}
4007
}