Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9303 → Rev 9304

/programs/cmm/browser/TWB/TWB.c
148,7 → 148,7
cur_encoding = CH_CP866;
if (custom_encoding != -1) {
cur_encoding = custom_encoding;
bufpointer = ChangeCharset(cur_encoding, "CP866", bufpointer);
bufpointer = ChangeCharset(cur_encoding, CH_CP866, bufpointer);
bufsize = strlen(bufpointer);
}
}
197,7 → 197,6
#tag.name, draw_x, draw_y, #linebuf));
}
//*/
 
RenderTextbuf();
if (debug_mode) { debugch('<'); if(!tag.opened)debugch('/'); debug(#tag.name); debugln(">"); }
$push cur_encoding
257,9 → 256,9
{
if (cur_encoding == _new_encoding) return;
cur_encoding = _new_encoding;
bufpointer = ChangeCharset(cur_encoding, "CP866", bufpointer);
bufpointer = ChangeCharset(cur_encoding, CH_CP866, bufpointer);
if (header) {
ChangeCharset(cur_encoding, "CP866", #header);
ChangeCharset(cur_encoding, CH_CP866, #header);
DrawTitle(#header);
}
}
/programs/cmm/browser/const.h
107,4 → 107,4
 
#define DEFAULT_URL URL_SERVICE_HOMEPAGE
 
char version[]="WebView 3.62";
char version[]="WebView 3.62b";
/programs/cmm/lib/obj/iconv.h
6,6 → 6,10
#include "../lib/kolibri.h"
#endif
 
#ifndef INCLUDE_ENCODING_H
#include "../lib/encoding.h"
#endif
 
dword iconv_lib = #a_iconv_lib;
char a_iconv_lib[]="/sys/lib/iconv.obj";
 
23,12 → 27,7
{
dword cd, in_len, out_len, new_buf;
 
from_chs = from_chs*10+#charsets;
 
//debug("iconv: from_chs = "); debugln(from_chs);
//debug("iconv: to_chs = "); debugln(to_chs);
 
iconv_open stdcall (from_chs, to_chs); //CP866, CP1251, CP1252, KOI8-RU, UTF-8, ISO8859-5
iconv_open stdcall (from_chs*10+#charsets, to_chs*10+#charsets);
if (EAX==-1) {
debugln("iconv: unsupported charset");
return 0;
35,19 → 34,20
}
cd = EAX;
 
in_len = out_len = strlen(conv_buf)+1;
new_buf = mem_Alloc(in_len);
in_len = strlen(conv_buf)+1;
out_len = in_len * 2;
new_buf = mem_Alloc(out_len);
iconv stdcall (cd, #conv_buf, #in_len, #new_buf, #out_len);
if (EAX!=0)
{
cd = EAX;
debugval("iconv: something is wrong with stdcall iconv()", cd);
debugval("in_len", in_len);
debugval("out_len", out_len);
new_buf = free(new_buf);
return conv_buf;
debugval("iconv failed", cd);
if (from_chs == CH_UTF8) && (to_chs == CH_CP866) {
utf8rutodos(conv_buf);
}
} else {
strcpy(conv_buf, new_buf);
}
free(new_buf);
return conv_buf;
}
/programs/cmm/lib/obj/netcode.h
10,16 → 10,14
#include "../lib/dll.h"
#endif
dword netcode_lib = #a_netcode_lib;
char a_netcode_lib[]="/sys/lib/netcode.obj";
char a_netcode_lib[]="/sys/lib/base64.obj";
 
dword base64_encode = #aBase64_encode;
dword base64_decode = #aBase64_decode;
dword qp_decode = #aQp_decode;
$DD 2 dup 0
 
char aBase64_encode[] = "base64_encode";
char aBase64_decode[] = "base64_decode";
char aQp_decode[] = "qp_decode";
 
/*int base64_encode(char inp[], char outp[], int len);
Кодирование массива inp длиной len в массив outp (строку с '\0'). Функция возвращает длину outp.