Subversion Repositories Kolibri OS

Compare Revisions

Ignore whitespace Rev 5689 → Rev 5690

/programs/cmm/liza/liza.c
6,7 → 6,6
#include "../lib/strings.h"
#include "../lib/mem.h"
#include "../lib/dll.h"
#include "../lib/encoding.h"
#include "../lib/gui.h"
#include "../lib/file_system.h"
#include "../lib/list_box.h"
106,7 → 105,7
load_dll(netcode_lib, #base64_encode,0);
load_dll(libio, #libio_init,1);
load_dll(libimg, #libimg_init,1);
if (load_dll2(iconv_lib, #iconv_open,0)!=0) { notify("Error while loading library - iconv.obj"); use_iconv=2; }
load_dll(iconv_lib, #iconv_open,0);
OpenMailDat();
SetEventMask(0x27);
LoginBoxLoop();
/programs/cmm/liza/parselist.c
52,26 → 52,17
void ConvertToDOS(dword inbuf, searchin)
{
dword dos_buf=0;
if (use_iconv==1)
{
cur_charset = CH_CP866;
if (strstri(searchin, "windows-1251")!=0) || (strstri(searchin, "windows1251")!=0)
{ dos_buf = ChangeCharset("CP1251", "CP866", inbuf); cur_charset = CH_CP1251;}
else if (strstri(searchin, "koi8-")!=0)
{ dos_buf = ChangeCharset("KOI8-RU", "CP866", inbuf); cur_charset = CH_KOI8;}
else if (strstri(searchin, "utf-8")!=0) || (strstri(searchin, "utf8")!=0)
{ dos_buf = ChangeCharset("UTF-8", "CP866", inbuf); cur_charset = CH_UTF8;}
else if (strstri(searchin, "iso8859-5")!=0) || (strstri(searchin, "iso-8859-5")!=0)
{ dos_buf = ChangeCharset("ISO8859-5", "CP866", inbuf); cur_charset = CH_ISO8859_5;}
else if (strstri(searchin, "windows-1252")!=0) || (strstri(searchin, "windows1252")!=0)
{ dos_buf = ChangeCharset("CP1252", "CP866", inbuf); cur_charset = CH_CP1252;}
}
else
{
if (strstri(searchin, "windows-1251")!=0) wintodos( inbuf); else
if (strstri(searchin, "koi8-")!=0) koitodos( inbuf); else
if (strstri(searchin, "utf-8")!=0) utf8rutodos( inbuf);
}
cur_charset = CH_CP866;
if (strstri(searchin, "windows-1251")!=0) || (strstri(searchin, "windows1251")!=0)
{ dos_buf = ChangeCharset("CP1251", "CP866", inbuf); cur_charset = CH_CP1251;}
else if (strstri(searchin, "koi8-")!=0)
{ dos_buf = ChangeCharset("KOI8-RU", "CP866", inbuf); cur_charset = CH_KOI8;}
else if (strstri(searchin, "utf-8")!=0) || (strstri(searchin, "utf8")!=0)
{ dos_buf = ChangeCharset("UTF-8", "CP866", inbuf); cur_charset = CH_UTF8;}
else if (strstri(searchin, "iso8859-5")!=0) || (strstri(searchin, "iso-8859-5")!=0)
{ dos_buf = ChangeCharset("ISO8859-5", "CP866", inbuf); cur_charset = CH_ISO8859_5;}
else if (strstri(searchin, "windows-1252")!=0) || (strstri(searchin, "windows1252")!=0)
{ dos_buf = ChangeCharset("CP1252", "CP866", inbuf); cur_charset = CH_CP1252;}
}
 
 
/programs/cmm/liza/settings.c
3,7 → 3,6
#define CUSTOM 0
#define MANUAL 1
char checked[3] = { 1, 0 };
int use_iconv = 1;
 
char *text1[] = {"POP server adress:", "POP server port:", "SMTP server adress:", "SMTP server port:", '\0'};
 
62,12 → 61,6
}
OptionsWindow();
}
if (id==20)
{
if (use_iconv==2) break;
if (use_iconv==1) use_iconv=0; else use_iconv=1;
OptionsWindow();
}
break;
case evKey:
120,7 → 113,4
edit_box_draw stdcall(#POP_server_port_box);
edit_box_draw stdcall(#SMTP_server_box);
edit_box_draw stdcall(#SMTP_server_port_box);
 
WriteTextB(ELEM_X, 205, 0x90, system.color.work_text, "MailBox settings");
CheckBox(ELEM_X, 230,12, 12, 20, "Use iconv library for converting text charsets", system.color.work_graph, system.color.work_text, use_iconv);
}