Rev 2819 | Rev 5911 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2819 | Rev 4990 | ||
---|---|---|---|
Line 16... | Line 16... | ||
16 | 16 | ||
17 | include '../../macros.inc' |
17 | include '../../macros.inc' |
18 | include '../../proc32.inc' |
18 | include '../../proc32.inc' |
19 | include '../../develop/libraries/box_lib/load_lib.mac' |
19 | include '../../develop/libraries/box_lib/load_lib.mac' |
20 | include '../../develop/libraries/box_lib/trunk/box_lib.mac' |
20 | include '../../develop/libraries/box_lib/trunk/box_lib.mac' |
21 | include '../t_edit/mem.inc' |
21 | include '../../dll.inc' |
22 | include 'te_data.inc' |
22 | include 'te_data.inc' |
Line 23... | Line 23... | ||
23 | include 'te_work.inc' ;text work functions |
23 | include 'te_work.inc' ;text work functions |
- | 24 | ||
- | 25 | @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load |
|
- | 26 | ||
- | 27 | ; ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥¨© á ¨á¯®«ì§®¢ ¨¥¬ ¡¨¡«¨®â¥ª¨ libimg.obj |
|
- | 28 | ;¤«ï ¨á¯®«ì§®¢ ¨ï ¬ ªà®á ã¦ë ¯¥à¥¬¥ë¥: |
|
- | 29 | ; - run_file_70 FileInfoBlock |
|
- | 30 | ; - image_data dd 0 |
|
- | 31 | macro load_image_file path,buf,size |
|
- | 32 | { |
|
- | 33 | ;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬ |
|
- | 34 | if path eqtype '' ;¯à®¢¥à塞 § ¤ «¨ áâப®© ¯ à ¬¥âà path |
|
- | 35 | jmp @f |
|
- | 36 | local .path_str |
|
- | 37 | .path_str db path ;ä®à¬¨à㥬 «®ª «ìãî ¯¥à¥¬¥ãî |
|
- | 38 | db 0 |
|
- | 39 | @@: |
|
- | 40 | ;32 - áâ ¤ àâë© ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥ ¡ëâì ¡ãä¥à á á¨áâ¥¬ë¬ ¯ã⥬ |
|
- | 41 | copy_path .path_str,[32],file_name,0x0 |
|
- | 42 | else |
|
- | 43 | copy_path path,[32],file_name,0x0 ;ä®à¬¨à㥬 ¯®«ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ® ¢ ®¤®© ¯ ¯ª¥ á ¯à®£à ¬¬®© |
|
- | 44 | end if |
|
- | 45 | ||
- | 46 | stdcall mem.Alloc, dword size ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥¨ï |
|
- | 47 | mov [buf],eax |
|
- | 48 | ||
- | 49 | mov eax,70 ;70-ï äãªæ¨ï à ¡®â á ä ©« ¬¨ |
|
- | 50 | mov [run_file_70.Function], 0 |
|
- | 51 | mov [run_file_70.Position], 0 |
|
- | 52 | mov [run_file_70.Flags], 0 |
|
- | 53 | mov [run_file_70.Count], dword size |
|
- | 54 | m2m [run_file_70.Buffer], [buf] |
|
- | 55 | mov byte[run_file_70+20], 0 |
|
- | 56 | mov [run_file_70.FileName], file_name |
|
- | 57 | mov ebx,run_file_70 |
|
- | 58 | int 0x40 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥¨ï |
|
- | 59 | cmp ebx,0xffffffff |
|
- | 60 | je @f |
|
- | 61 | ;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥¨ï ¨ ¯¥à¥¢®¤¨¬ ¥£® ¢® ¢à¥¬¥ë© ¡ãä¥à image_data |
|
- | 62 | stdcall dword[img_decode], dword[buf],ebx,0 |
|
- | 63 | mov dword[image_data],eax |
|
- | 64 | ;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥¨¥ ª ä®à¬ âã rgb |
|
- | 65 | stdcall dword[img_to_rgb2], dword[image_data],dword[buf] |
|
- | 66 | ;㤠«ï¥¬ ¢à¥¬¥ë© ¡ãä¥à image_data |
|
- | 67 | stdcall dword[img_destroy], dword[image_data] |
|
- | 68 | @@: |
|
- | 69 | } |
|
- | 70 | ||
Line 24... | Line 71... | ||
24 | 71 | image_data dd 0 ;㪠§ â¥«ì ¢à¥¬¥ãî ¯ ¬ïâì. ¤«ï 㦥 ¯à¥®¡à §®¢ ¨ï ¨§®¡à ¦¥¨ï |
|
25 | @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,0 |
72 | icon_tl_sys dd 0 ;㪠§ â¥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª |
26 | 73 | ||
Line 52... | Line 99... | ||
52 | mcall -1 ;exit not correct |
99 | mcall -1 ;exit not correct |
53 | @@: |
100 | @@: |
Line 54... | Line 101... | ||
54 | 101 | ||
55 | ;--------------------------------------------------------------------- |
102 | ;--------------------------------------------------------------------- |
56 | stdcall dword[tl_data_init],dword tree1 |
- | |
Line -... | Line 103... | ||
- | 103 | stdcall dword[tl_data_init],dword tree1 |
|
57 | copy_path fn_icon_tl_sys,sys_path,file_name,0 |
104 | |
58 | 105 | ; ç¨â ¥¬ ä ©« á ªãàá®à ¬¨ ¨ «¨¨ï¬¨ |
|
59 | mov ecx,3*256*13 |
106 | load_image_file 'tl_sys_16.png', icon_tl_sys,54+3*256*13 |
60 | stdcall mem.Alloc,ecx |
- | |
61 | mov dword[tree1.data_img_sys],eax |
- | |
62 | - | ||
63 | mov [run_file_70.Function], 0 |
- | |
64 | mov [run_file_70.Position], 54 |
- | |
65 | mov [run_file_70.Flags], 0 |
- | |
66 | mov [run_file_70.Count], ecx |
- | |
67 | mov [run_file_70.Buffer], eax |
- | |
68 | mov byte[run_file_70+20], 0 |
- | |
69 | mov [run_file_70.FileName], file_name |
- | |
70 | - | ||
71 | mov eax,70 ;load icon file |
- | |
72 | mov ebx,run_file_70 |
- | |
73 | int 0x40 |
- | |
74 | cmp ebx,0 |
- | |
75 | jg @f |
- | |
76 | mov dword[tree1.data_img_sys],0 |
107 | mov eax,dword[icon_tl_sys] |
77 | @@: |
108 | mov dword[tree1.data_img_sys],eax |
78 | ;--------------------------------------------------------------------- |
109 | ;--------------------------------------------------------------------- |
79 | ; ç¨â ¥¬ bmp ä ©« á ¨ª®ª ¬¨ 㧫®¢ |
- | |
80 | copy_path fn_icon_tl_nod,sys_path,file_name,0 |
110 | ; ç¨â ¥¬ bmp ä ©« á ¨ª®ª ¬¨ 㧫®¢ |
81 | - | ||
82 | mov ecx,3*256*2 |
111 | load_image_file 'tl_nod_16.png', icon_tl_sys,54+3*256*2 |
83 | stdcall mem.Alloc,ecx |
- | |
84 | mov dword[tree1.data_img],eax |
- | |
85 | - | ||
86 | ; mov [run_file_70.Function], 0 |
- | |
87 | ; mov [run_file_70.Position], 54 |
- | |
88 | ; mov [run_file_70.Flags], 0 |
- | |
89 | mov [run_file_70.Count], ecx |
- | |
90 | mov [run_file_70.Buffer], eax |
- | |
91 | ; mov byte[run_file_70+20], 0 |
- | |
92 | ; mov [run_file_70.FileName], file_name |
- | |
93 | - | ||
94 | mov eax,70 ;load icon file |
- | |
95 | mov ebx,run_file_70 |
- | |
96 | int 0x40 |
- | |
97 | cmp ebx,0 |
- | |
98 | jg @f |
- | |
99 | mov dword[tree1.data_img],0 |
112 | mov eax,dword[icon_tl_sys] |
100 | @@: |
113 | mov dword[tree1.data_img],eax |
101 | ;------------------------------------------------------------------------------ |
114 | ;------------------------------------------------------------------------------ |
102 | copy_path fn_syntax_dir,sys_path,file_name,0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ á¨â ªá¨á |
115 | copy_path fn_syntax_dir,sys_path,file_name,0 ;¡¥à¥¬ ¯ãâì ª ¯ ¯ª¥ á ä ©« ¬¨ á¨â ªá¨á |
103 | mov eax,70 |
116 | mov eax,70 |
Line 322... | Line 335... | ||
322 | call InitColText |
335 | call InitColText |
323 | ret |
336 | ret |
Line 324... | Line 337... | ||
324 | 337 | ||
325 | align 4 |
338 | align 4 |
326 | but_SaveSyntax: |
339 | but_SaveSyntax: |
327 | stdcall [ted_but_save_file], tedit0,run_file_70,[edit1.text] |
340 | stdcall [ted_save_file], tedit0,run_file_70,[edit1.text] |
Line 328... | Line 341... | ||
328 | ret |
341 | ret |
329 | 342 | ||
330 | align 4 |
343 | align 4 |
Line 363... | Line 376... | ||
363 | ;jne @f |
376 | ;jne @f |
364 | ; mov eax,tedit1 |
377 | ; mov eax,tedit1 |
365 | ;@@: |
378 | ;@@: |
366 | ret |
379 | ret |
Line 367... | Line 380... | ||
367 | 380 | ||
368 | hed db 'TextEditor syntax file converter 23.06.12',0 ;¯®¤¯¨áì ®ª |
381 | hed db 'TextEditor syntax file converter 01.07.14',0 ;¯®¤¯¨áì ®ª |
Line 369... | Line 382... | ||
369 | conv_tabl rb 128 ; â ¡«¨æ ¤«ï ª®¢¥àâ¨à®¢ ¨ï scan-ª®¤ ¢ ascii-ª®¤ |
382 | conv_tabl rb 128 ; â ¡«¨æ ¤«ï ª®¢¥àâ¨à®¢ ¨ï scan-ª®¤ ¢ ascii-ª®¤ |
370 | 383 | ||
371 | txt122 db ' £à. ä ©«',0 |
384 | txt122 db ' £à. ä ©«',0 |
372 | txt148 db '®åà. ä ©«',0 |
385 | txt148 db '®åà. ä ©«',0 |
Line 373... | Line 386... | ||
373 | txt_inp_file db 'áå. ä ©«:',0 |
386 | txt_inp_file db 'áå. ä ©«:',0 |
- | 387 | txt_out_file db 'ëå. ä ©«:',0 |
|
374 | txt_out_file db 'ëå. ä ©«:',0 |
388 | |
375 | 389 | txt_no_kpack db 'âªàë¢ ¥¬ë© ä ©« ᦠâ Kpack-®¬.',13,10,'«ï à ¡®âë á ä ©«®¬ à ᯠªã©â¥ ¥£® ¨á¯®«ì§ãï á¨á⥬ãî ¯à®£à ¬¬ã Kpack.',13,10,' ¡®â ᮠᦠâ묨 ä ©« ¬¨ ¯®ª ¥ ¯®¤¤¥à¦¨¢ ¥âáï.',0 |
|
- | 390 | ||
376 | err_message_found_lib0 db 'Sorry I cannot found library box_lib.obj',0 |
391 | head_f_i: |
377 | head_f_i0: |
392 | head_f_l db 'System error',0 |
- | 393 | err_message_found_lib_0 db 'Sorry I cannot found library ',39,'box_lib.obj',39,0 |
|
Line 378... | Line 394... | ||
378 | head_f_l0 db 'System error',0 |
394 | err_message_import_0 db 'Error on load import library ',39,'box_lib.obj',39,0 |
379 | err_message_import0 db 'Error on load import library box_lib.obj',0 |
395 | err_message_found_lib_1 db 'Sorry I cannot found library ',39,'libimg.obj',39,0 |
380 | err_message_found_lib1 db 'Sorry I cannot found library msgbox.obj',0 |
396 | err_message_import_1 db 'Error on load import library ',39,'libimg.obj',39,0 |
- | 397 | ||
381 | 398 | ;library structures |
|
Line 382... | Line 399... | ||
382 | ;library structures |
399 | l_libs_start: |
383 | l_libs_start: |
400 | lib0 l_libs lib_name_0, sys_path, file_name, system_dir_0, err_message_found_lib_0, head_f_l, import_box_lib,err_message_import_0, head_f_i |