Rev 4636 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4636 | Rev 4643 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | //images |
28 | //images |
29 | #include "img\toolbar_icons.c" |
29 | #include "img\toolbar_icons.c" |
30 | #include "img\URLgoto.txt"; |
30 | #include "img\URLgoto.txt"; |
Line 31... | Line 31... | ||
31 | 31 | ||
32 | #ifdef LANG_RUS |
32 | #ifdef LANG_RUS |
33 | char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 0.99.69"; |
33 | char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 0.99.7"; |
34 | ?define IMAGES_CACHE_CLEARED "íè ª à⨮ª ®ç¨é¥" |
34 | ?define IMAGES_CACHE_CLEARED "íè ª à⨮ª ®ç¨é¥" |
35 | ?define T_LAST_SLIDE "â® ¯®á«¥¤¨© á« ©¤" |
35 | ?define T_LAST_SLIDE "â® ¯®á«¥¤¨© á« ©¤" |
36 | char loading[] = " £à㧪 áâà ¨æë... |
36 | char loading[] = " £à㧪 áâà ¨æë... |
37 | unsigned char page_not_found[] = FROM "html\page_not_found_ru.htm"; |
37 | unsigned char page_not_found[] = FROM "html\page_not_found_ru.htm"; |
38 | char accept_language[]= "Accept-Language: ru\n\0"; |
38 | char accept_language[]= "Accept-Language: ru\n\0"; |
39 | #else |
39 | #else |
40 | char version[]=" Text-based Browser 0.99.69"; |
40 | char version[]=" Text-based Browser 0.99.7"; |
41 | ?define IMAGES_CACHE_CLEARED "Images cache cleared" |
41 | ?define IMAGES_CACHE_CLEARED "Images cache cleared" |
42 | ?define T_LAST_SLIDE "This slide is the last" |
42 | ?define T_LAST_SLIDE "This slide is the last" |
43 | char loading[] = "Loading... |
43 | char loading[] = "Loading... |
44 | unsigned char page_not_found[] = FROM "html\page_not_found_en.htm"; |
44 | unsigned char page_not_found[] = FROM "html\page_not_found_en.htm"; |
Line 76... | Line 76... | ||
76 | void main() |
76 | void main() |
77 | { |
77 | { |
78 | int key, btn; |
78 | int key, btn; |
79 | int half_scroll_size; |
79 | int half_scroll_size; |
80 | int scroll_used=0, show_menu; |
80 | int scroll_used=0, show_menu; |
- | 81 | int bufpointer_len; |
|
Line 81... | Line 82... | ||
81 | 82 | ||
82 | mem_Init(); |
83 | mem_Init(); |
83 | CursorPointer.Load(#CursorFile); |
84 | CursorPointer.Load(#CursorFile); |
84 | if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();} |
85 | if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("System Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();} |
Line 165... | Line 166... | ||
165 | break; |
166 | break; |
Line 166... | Line 167... | ||
166 | 167 | ||
167 | case evNetwork: |
168 | case evNetwork: |
168 | if (http_transfer > 0) { |
169 | if (http_transfer > 0) { |
169 | http_process stdcall (http_transfer); |
- | |
170 | $push EAX |
- | |
171 | ESI = http_transfer; |
- | |
172 | if (o_bufpointer) o_bufpointer = free(o_bufpointer); |
- | |
173 | bufpointer = ESI.http_msg.content_ptr; |
- | |
174 | bufsize = ESI.http_msg.content_received; |
- | |
175 | WB1.Parse(); |
- | |
176 | - | ||
177 | $pop EAX |
170 | http_process stdcall (http_transfer); |
178 | if (EAX == 0) { |
171 | if (EAX == 0) { |
179 | ESI = http_transfer; |
172 | ESI = http_transfer; |
180 | // Handle redirects |
173 | // Handle redirects |
181 | if (ESI.http_msg.status >= 300) && (ESI.http_msg.status < 400) |
174 | if (ESI.http_msg.status >= 300) && (ESI.http_msg.status < 400) |
Line 202... | Line 195... | ||
202 | else |
195 | else |
203 | { |
196 | { |
204 | redirected = 0; |
197 | redirected = 0; |
205 | } |
198 | } |
206 | // Loading the page is complete, free resources |
199 | // Loading the page is complete, free resources |
207 | http_free stdcall (http_transfer); |
- | |
208 | http_transfer=0; |
- | |
209 | if (redirected>0) |
200 | if (redirected>0) |
210 | { |
201 | { |
- | 202 | http_free stdcall (http_transfer); |
|
- | 203 | http_transfer=0; |
|
211 | WB1.GetNewUrl(); |
204 | WB1.GetNewUrl(); |
212 | strcpy(#editURL, #URL); |
205 | strcpy(#editURL, #URL); |
213 | BrowserHistory.current--; |
206 | BrowserHistory.current--; |
214 | OpenPage(); |
207 | OpenPage(); |
215 | } |
208 | } |
216 | else |
209 | else |
217 | { |
210 | { |
- | 211 | if (o_bufpointer) o_bufpointer = free(o_bufpointer); |
|
- | 212 | ESI = http_transfer; |
|
- | 213 | bufpointer = ESI.http_msg.content_ptr; |
|
- | 214 | bufsize = ESI.http_msg.content_received; |
|
- | 215 | bufpointer_len = strlen(bufpointer); |
|
- | 216 | http_free stdcall (http_transfer); |
|
- | 217 | http_transfer=0; |
|
218 | Draw_Window(); // stop button => refresh button |
218 | Draw_Window(); // stop button => refresh button |
219 | } |
219 | } |
220 | } |
220 | } |
221 | } |
221 | } |
222 | } |
222 | } |
Line 333... | Line 333... | ||
333 | case 054: //F5 |
333 | case 054: //F5 |
334 | IF(address_box.flags & 0b10) WB1.Parse(); |
334 | IF(address_box.flags & 0b10) WB1.Parse(); |
335 | return; |
335 | return; |
Line 336... | Line 336... | ||
336 | 336 | ||
337 | case REFRESH: |
337 | case REFRESH: |
- | 338 | if (http_transfer > 0) |
|
- | 339 | { |
|
- | 340 | StopLoading(); |
|
- | 341 | Draw_Window(); |
|
338 | if (http_transfer > 0) StopLoading(); |
342 | } |
339 | else OpenPage(); |
343 | else OpenPage(); |
340 | return; |
344 | return; |
341 | case 014: |
345 | case 014: |
342 | case 020: |
346 | case 020: |