/programs/cmm/TWB/TWB.c |
---|
116,7 → 116,7 |
if (URL[0] == '/') |
{ |
i = strchr(#newurl+8, '/'); |
newurl[i+7]=0; |
if (i>0) newurl[i+7]=0; |
strcpy(#URL, #URL+1); |
} |
142,12 → 142,19 |
void BufEncode(int set_new_encoding) |
{ |
int bufpointer_realsize; |
cur_encoding = set_new_encoding; |
if (o_bufpointer==0) |
{ |
bufpointer_realsize = strlen(bufpointer); |
if (bufpointer_realsize > bufsize) |
{ |
debug("bufsize: "); |
debugi(bufsize); |
bufsize = strlen(bufpointer); |
debugi(bufsize); |
debug("bufpointer_realsize: "); |
debugi(bufpointer_realsize); |
bufsize = bufpointer_realsize; |
} |
o_bufpointer = malloc(bufsize); |
strcpy(o_bufpointer, bufpointer); |
} |
412,6 → 419,10 |
DrawBuf.Fill(bg_color); |
} |
} while(GetNextParam()); |
if (opened) |
{ |
if (cur_encoding==_DEFAULT) BufEncode(_UTF); //if no encoding specified it would be UTF |
} |
return; |
} |
630,7 → 641,7 |
if (!strcmp(#options, "koi8-r")) || (!strcmp(#options, "koi8-u")) meta_encoding = _KOI; |
if (!strcmp(#options, "windows-1251")) || (!strcmp(#options, "windows1251")) meta_encoding = _WIN; |
//if (!strcmp(#options, "dos")) || (!strcmp(#options, "cp-866")) meta_encoding = _DOS; |
if ((cur_encoding==_DEFAULT) && (http_transfer==0)) BufEncode(meta_encoding); |
if (cur_encoding==_DEFAULT) BufEncode(meta_encoding); |
return; |
} |
} while(GetNextParam()); |
/programs/cmm/browser/HTMLv.c |
---|
30,7 → 30,7 |
#include "img\URLgoto.txt"; |
#ifdef LANG_RUS |
char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 0.99.71"; |
char version[]=" ¥ªáâ®¢ë© ¡à 㧥à 0.99.72"; |
?define IMAGES_CACHE_CLEARED "íè ª à⨮ª ®ç¨é¥" |
?define T_LAST_SLIDE "â® ¯®á«¥¤¨© á« ©¤" |
char loading[] = " £à㧪 áâà ¨æë...<br>"; |
37,7 → 37,7 |
unsigned char page_not_found[] = FROM "html\page_not_found_ru.htm"; |
char accept_language[]= "Accept-Language: ru\n\0"; |
#else |
char version[]=" Text-based Browser 0.99.71"; |
char version[]=" Text-based Browser 0.99.72"; |
?define IMAGES_CACHE_CLEARED "Images cache cleared" |
?define T_LAST_SLIDE "This slide is the last" |
char loading[] = "Loading...<br>"; |
459,8 → 459,6 |
void StopLoading() |
{ |
if (http_transfer<>0) |
{ |
EAX = http_transfer; |
EAX = EAX.http_msg.content_ptr; // get pointer to data |
$push EAX // save it on the stack |
471,7 → 469,6 |
bufsize = 0; |
PutPaletteImage(#toolbar,200,42,0,0,8,#toolbar_pal); |
} |
} |
void SetPageDefaults() |
{ |
495,6 → 492,13 |
_PutImage(88,10, 24,24, #stop_btn); |
http_get stdcall (#URL, #accept_language); |
http_transfer = EAX; |
if (http_transfer == 0) |
{ |
StopLoading(); |
bufsize = 0; |
ShowPage(); |
return; |
} |
IF (http_transfer < 0) notify("Error from HTTP lib"); |
} |
else |
/programs/cmm/lib/kolibri.h |
---|
139,7 → 139,13 |
$shr eax,8 |
} |
inline fastcall int GetFullKey() |
{ |
$mov eax,2 |
$int 0x40 |
} |
inline fastcall pause( EBX) |
{ |
$mov eax, 5 |
362,7 → 368,27 |
$pop eax |
} |
inline fastcall void debug( EDX) |
{ |
$push eax |
$push ebx |
$push ecx |
$mov eax, 63 |
$mov ebx, 1 |
NEXT_CHAR: |
$mov ecx, DSDWORD[edx] |
$or cl, cl |
$jz DONE |
$int 0x40 |
$inc edx |
$jmp NEXT_CHAR |
DONE: |
$pop ecx |
$pop ebx |
$pop eax |
} |
inline fastcall void debugch( ECX) |
{ |
$push eax |