Rev 4645 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4645 | Rev 4646 | ||
---|---|---|---|
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.71"; |
33 | char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 0.99.72"; |
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.71"; |
40 | char version[]=" Text-based Browser 0.99.72"; |
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 457... | Line 457... | ||
457 | return; |
457 | return; |
458 | } |
458 | } |
Line 459... | Line 459... | ||
459 | 459 | ||
460 | void StopLoading() |
460 | void StopLoading() |
461 | { |
- | |
462 | if (http_transfer<>0) |
- | |
463 | { |
461 | { |
464 | EAX = http_transfer; |
462 | EAX = http_transfer; |
465 | EAX = EAX.http_msg.content_ptr; // get pointer to data |
463 | EAX = EAX.http_msg.content_ptr; // get pointer to data |
466 | $push EAX // save it on the stack |
464 | $push EAX // save it on the stack |
467 | http_free stdcall (http_transfer); // abort connection |
465 | http_free stdcall (http_transfer); // abort connection |
468 | $pop EAX |
466 | $pop EAX |
469 | mem_Free(EAX); // free data |
467 | mem_Free(EAX); // free data |
470 | http_transfer=0; |
468 | http_transfer=0; |
471 | bufsize = 0; |
469 | bufsize = 0; |
472 | PutPaletteImage(#toolbar,200,42,0,0,8,#toolbar_pal); |
470 | PutPaletteImage(#toolbar,200,42,0,0,8,#toolbar_pal); |
473 | } |
- | |
Line 474... | Line 471... | ||
474 | } |
471 | } |
475 | 472 | ||
476 | void SetPageDefaults() |
473 | void SetPageDefaults() |
477 | { |
474 | { |
Line 493... | Line 490... | ||
493 | if (strncmp(#URL,"http:",5)==0) |
490 | if (strncmp(#URL,"http:",5)==0) |
494 | { |
491 | { |
495 | _PutImage(88,10, 24,24, #stop_btn); |
492 | _PutImage(88,10, 24,24, #stop_btn); |
496 | http_get stdcall (#URL, #accept_language); |
493 | http_get stdcall (#URL, #accept_language); |
497 | http_transfer = EAX; |
494 | http_transfer = EAX; |
- | 495 | if (http_transfer == 0) |
|
- | 496 | { |
|
- | 497 | StopLoading(); |
|
- | 498 | bufsize = 0; |
|
- | 499 | ShowPage(); |
|
- | 500 | return; |
|
- | 501 | } |
|
498 | IF (http_transfer < 0) notify("Error from HTTP lib"); |
502 | IF (http_transfer < 0) notify("Error from HTTP lib"); |
499 | } |
503 | } |
500 | else |
504 | else |
501 | { |
505 | { |
502 | file_size stdcall (#URL); |
506 | file_size stdcall (#URL); |