Rev 4834 | Rev 5770 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4834 | Rev 5541 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
2 | ;; ;; |
3 | ;; Copyright (C) KolibriOS team 2014. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2014-2015. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;; pasta.asm - Paste text to paste.kolibrios.org from a file or ;; |
6 | ;; pasta.asm - Paste text to paste.kolibrios.org from a file or ;; |
7 | ;; from clipboard. ;; |
7 | ;; from clipboard. ;; |
8 | ;; ;; |
8 | ;; ;; |
Line 99... | Line 99... | ||
99 | push eax |
99 | push eax |
100 | mcall 68, 13, [clipboard_data] |
100 | mcall 68, 13, [clipboard_data] |
101 | pop [clipboard_data] |
101 | pop [clipboard_data] |
Line 102... | Line 102... | ||
102 | 102 | ||
103 | ; Connect to the server |
103 | ; Connect to the server |
104 | invoke HTTP_get, sz_url, 0 |
104 | invoke HTTP_get, sz_url, 0, 0, 0 |
105 | test eax, eax |
105 | test eax, eax |
106 | jz error_free_clip |
106 | jz error_free_clip |
Line 107... | Line 107... | ||
107 | mov [identifier], eax |
107 | mov [identifier], eax |
108 | 108 | ||
109 | .again: |
109 | .again: |
110 | invoke HTTP_process, [identifier] |
110 | invoke HTTP_receive, [identifier] |
Line 111... | Line 111... | ||
111 | test eax, eax |
111 | test eax, eax |
112 | jnz .again |
112 | jnz .again |
Line 137... | Line 137... | ||
137 | 137 | ||
Line 138... | Line 138... | ||
138 | invoke HTTP_free, [identifier] |
138 | invoke HTTP_free, [identifier] |
139 | 139 | ||
140 | mov ecx, [clipboard_data_length] |
140 | mov ecx, [clipboard_data_length] |
141 | add ecx, sz_paste_head.length + sz_paste_tail.length |
141 | add ecx, sz_paste_head.length + sz_paste_tail.length |
142 | invoke HTTP_post, sz_url, sz_cookie, sz_ctype, ecx |
142 | invoke HTTP_post, sz_url, 0, 0, sz_cookie, sz_ctype, ecx |
143 | test eax, eax |
143 | test eax, eax |
Line 144... | Line 144... | ||
144 | jz error_free_clip |
144 | jz error_free_clip |
Line 152... | Line 152... | ||
152 | 152 | ||
153 | ; Free the data |
153 | ; Free the data |
Line 154... | Line 154... | ||
154 | mcall 68, 13, [clipboard_data] |
154 | mcall 68, 13, [clipboard_data] |
155 | 155 | ||
156 | .again2: |
156 | .again2: |
157 | invoke HTTP_process, [identifier] |
157 | invoke HTTP_receive, [identifier] |
Line 158... | Line 158... | ||
158 | test eax, eax |
158 | test eax, eax |
159 | jnz .again2 |
159 | jnz .again2 |
Line 222... | Line 222... | ||
222 | 222 | ||
Line 223... | Line 223... | ||
223 | library lib_http, 'http.obj' |
223 | library lib_http, 'http.obj' |
224 | 224 | ||
225 | import lib_http, \ |
- | |
226 | HTTP_get, 'get', \ |
- | |
227 | HTTP_process, 'process', \ |
- | |
228 | HTTP_free, 'free', \ |
225 | import lib_http, \ |
- | 226 | HTTP_get, 'get', \ |
|
229 | HTTP_stop, 'stop', \ |
227 | HTTP_post, 'post', \ |
- | 228 | HTTP_receive, 'receive', \ |
|
230 | HTTP_post, 'post', \ |
229 | HTTP_find_header_field, 'find_header_field', \ |
Line 231... | Line 230... | ||
231 | HTTP_find_header_field, 'find_header_field', \ |
230 | HTTP_free, 'free', \ |
Line 232... | Line 231... | ||
232 | HTTP_escape, 'escape' |
231 | HTTP_escape, 'escape' |