Rev 4896 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4896 | Rev 5174 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | Clipboard clipboard; |
8 | Clipboard clipboard; |
9 | 9 | ||
- | 10 | void Copy(dword pcth, char cut) |
|
- | 11 | { |
|
- | 12 | dword selected_offset2; |
|
- | 13 | byte copy_t[4096]; |
|
10 | void Copy(dword pcth, char cut) |
14 | int cont = 0; |
- | 15 | dword buff_data; |
|
- | 16 | int ind = 0; |
|
- | 17 | ||
11 | { |
18 | for (i=0; i |
12 | if (mark_active == 0) { |
19 | { |
13 | strlcpy(#elements_path.element_list[elements_path.count].Item, pcth); |
20 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
- | 21 | if (ESBYTE[selected_offset2]) cont++; |
|
- | 22 | } |
|
- | 23 | buff_data = malloc(cont*4096+10); |
|
- | 24 | ESDWORD[buff_data] = cont*4096+10; |
|
- | 25 | ESDWORD[buff_data+4] = 3; |
|
- | 26 | ESINT[buff_data+8] = cont; |
|
- | 27 | for (i=0; i |
|
- | 28 | { |
|
14 | elements_path.count++; |
29 | selected_offset2 = file_mas[i]*304 + buf+32 + 7; |
- | 30 | if (ESBYTE[selected_offset2]) { |
|
- | 31 | strcpy(#copy_t, #path); |
|
- | 32 | strcat(#copy_t, file_mas[i]*304+buf+72); |
|
- | 33 | ||
- | 34 | strlcpy(ind*4096+buff_data+10, #copy_t, 4096); |
|
- | 35 | ind++; |
|
15 | } |
36 | } |
16 | elements_path.size = sizeof(elements_path); |
37 | } |
17 | clipboard.SetSlotData(sizeof(elements_path), #elements_path); |
38 | clipboard.SetSlotData(cont*4096+10, buff_data); |
Line 18... | Line 39... | ||
18 | cut_active = cut; |
39 | cut_active = cut; |
19 | } |
40 | } |
Line 34... | Line 55... | ||
34 | 55 | ||
35 | void Paste() |
56 | void Paste() |
36 | { |
57 | { |
37 | char copy_rezult; |
58 | char copy_rezult; |
- | 59 | byte copy_from[4096]; |
|
38 | byte copy_from[4096]; |
60 | int j; |
39 | int tst, count, j; |
61 | int cnt = 0; |
Line 40... | Line 62... | ||
40 | dword buf; |
62 | dword buf; |
41 | - | ||
42 | buf = clipboard.GetSlotData(clipboard.GetSlotCount()-1); |
63 | |
43 | count = DSINT[buf+8]; |
64 | buf = clipboard.GetSlotData(clipboard.GetSlotCount()-1); |
44 | if (DSDWORD[buf+4] != 3) return; |
- | |
45 | debugi(count); |
65 | if (DSDWORD[buf+4] != 3) return; |
46 | - | ||
47 | for (j = 0; j < count; j++) { |
66 | cnt = ESINT[buf+8]; |
48 | tst = j*4096; |
67 | for (j = 0; j < cnt; j++) { |
49 | strlcpy(#copy_from, buf+12+tst, 4096); |
68 | strlcpy(#copy_from, j*4096+buf+10, 4096); |
50 | if (!copy_from) CopyExit(); |
69 | if (!copy_from) CopyExit(); |
51 | strcpy(#copy_to, #path); |
70 | strcpy(#copy_to, #path); |
52 | strcat(#copy_to, #copy_from+strrchr(#copy_from,'/')); |
71 | strcat(#copy_to, #copy_from+strrchr(#copy_from,'/')); |
Line 75... | Line 94... | ||
75 | } |
94 | } |
76 | if (cut_active) |
95 | if (cut_active) |
77 | { |
96 | { |
78 | cut_active=false; |
97 | cut_active=false; |
79 | } |
98 | } |
80 | mark_default(); |
99 | //mark_default(); |
81 | CopyExit(); |
100 | CopyExit(); |
82 | } |
101 | } |
Line 83... | Line 102... | ||
83 | 102 | ||
84 | void CopyExit() |
103 | void CopyExit() |