diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 10:06:32 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 10:06:32 +0000 |
commit | 5a17c9299e03bebf46169927abdeee34aaf8e854 (patch) | |
tree | cbd13080f33ac0b6396b9d3b8ba31a3c98de59f8 /protocols/AimOscar | |
parent | ed64312924e77707e7e5b5965c301692519f293a (diff) |
replace strlen to mir_strlen
git-svn-id: http://svn.miranda-ng.org/main/trunk@13747 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar')
-rw-r--r-- | protocols/AimOscar/src/avatars.cpp | 2 | ||||
-rw-r--r-- | protocols/AimOscar/src/away.cpp | 6 | ||||
-rw-r--r-- | protocols/AimOscar/src/client.cpp | 72 | ||||
-rw-r--r-- | protocols/AimOscar/src/conv.cpp | 118 | ||||
-rw-r--r-- | protocols/AimOscar/src/file.cpp | 2 | ||||
-rw-r--r-- | protocols/AimOscar/src/proto.cpp | 6 | ||||
-rw-r--r-- | protocols/AimOscar/src/proxy.cpp | 4 | ||||
-rw-r--r-- | protocols/AimOscar/src/server.cpp | 4 | ||||
-rw-r--r-- | protocols/AimOscar/src/ui.cpp | 6 | ||||
-rw-r--r-- | protocols/AimOscar/src/utility.cpp | 14 |
10 files changed, 117 insertions, 117 deletions
diff --git a/protocols/AimOscar/src/avatars.cpp b/protocols/AimOscar/src/avatars.cpp index 2d6de87415..0ecf63cb42 100644 --- a/protocols/AimOscar/src/avatars.cpp +++ b/protocols/AimOscar/src/avatars.cpp @@ -34,7 +34,7 @@ void __cdecl CAimProto::avatar_request_thread(void* param) }
char type = getByte(hContact, AIM_KEY_AHT, 1);
- size_t len = (strlen(hash_str) + 1) / 2;
+ size_t len = (mir_strlen(hash_str) + 1) / 2;
char* hash = (char*)alloca(len);
string_to_bytes(hash_str, hash);
debugLogA("Requesting an Avatar: %s (Hash: %s)", sn, hash_str);
diff --git a/protocols/AimOscar/src/away.cpp b/protocols/AimOscar/src/away.cpp index 3b1665e2c9..ec8fdbb4fa 100644 --- a/protocols/AimOscar/src/away.cpp +++ b/protocols/AimOscar/src/away.cpp @@ -49,12 +49,12 @@ int CAimProto::aim_set_away(HANDLE hServerConn, unsigned short &seqno, const cha if (!amsg) return -1;
setDword(AIM_KEY_LA, (DWORD)time(NULL));
html_msg = html_encode(amsg && amsg[0] ? amsg : DEFAULT_AWAY_MSG);
- msg_size = strlen(html_msg);
+ msg_size = mir_strlen(html_msg);
}
aimString str(html_msg);
const char *charset = str.isUnicode() ? AIM_MSG_TYPE_UNICODE : AIM_MSG_TYPE;
- const unsigned short charset_len = (unsigned short)strlen(charset);
+ const unsigned short charset_len = (unsigned short)mir_strlen(charset);
const char* msg = str.getBuf();
const unsigned short msg_len = str.getSize();
@@ -108,7 +108,7 @@ int CAimProto::aim_set_statusmsg(HANDLE hServerConn, unsigned short &seqno, cons int CAimProto::aim_query_away_message(HANDLE hServerConn, unsigned short &seqno, const char* sn)
{
unsigned short offset = 0;
- unsigned short sn_length = (unsigned short)strlen(sn);
+ unsigned short sn_length = (unsigned short)mir_strlen(sn);
char *buf = (char*)alloca(SNAC_SIZE + 5 + sn_length);
aim_writesnac(0x02, 0x15, offset, buf);
aim_writegeneric(4, "\0\0\0\x02", offset, buf);
diff --git a/protocols/AimOscar/src/client.cpp b/protocols/AimOscar/src/client.cpp index a766db7187..169003f94c 100644 --- a/protocols/AimOscar/src/client.cpp +++ b/protocols/AimOscar/src/client.cpp @@ -26,9 +26,9 @@ int CAimProto::aim_send_connection_packet(HANDLE hServerConn,unsigned short &seq int CAimProto::aim_authkey_request(HANDLE hServerConn,unsigned short &seqno)
{
unsigned short offset=0;
- char* buf=(char*)alloca(SNAC_SIZE+TLV_HEADER_SIZE*3+strlen(username));
+ char* buf=(char*)alloca(SNAC_SIZE+TLV_HEADER_SIZE*3+mir_strlen(username));
aim_writesnac(0x17,0x06,offset,buf);
- aim_writetlv(0x01,(unsigned short)strlen(username),username,offset,buf);
+ aim_writetlv(0x01,(unsigned short)mir_strlen(username),username,offset,buf);
aim_writetlv(0x4B,0,0,offset,buf);
aim_writetlv(0x5A,0,0,offset,buf);
return aim_sendflap(hServerConn,0x02,offset,buf,seqno);
@@ -43,10 +43,10 @@ int CAimProto::aim_auth_request(HANDLE hServerConn,unsigned short &seqno,const c mir_md5_state_t state;
mir_md5_init(&state);
- mir_md5_append(&state,(const BYTE *)password, (int)strlen(password));
+ mir_md5_append(&state,(const BYTE *)password, (int)mir_strlen(password));
mir_md5_finish(&state,pass_hash);
mir_md5_init(&state);
- mir_md5_append(&state,(BYTE*)key, (int)strlen(key));
+ mir_md5_append(&state,(BYTE*)key, (int)mir_strlen(key));
mir_md5_append(&state,(BYTE*)pass_hash,MD5_HASH_LENGTH);
mir_md5_append(&state,(BYTE*)AIM_MD5_STRING, sizeof(AIM_MD5_STRING)-1);
mir_md5_finish(&state,auth_hash);
@@ -55,10 +55,10 @@ int CAimProto::aim_auth_request(HANDLE hServerConn,unsigned short &seqno,const c CallService(MS_SYSTEM_GETVERSIONTEXT, sizeof(mirver), (LPARAM)mirver);
int client_id_len = mir_snprintf(client_id, SIZEOF(client_id), "Miranda AIM, version %s", mirver);
- char* buf=(char*)alloca(SNAC_SIZE+TLV_HEADER_SIZE*14+MD5_HASH_LENGTH+strlen(username)+client_id_len+30+strlen(language)+strlen(country));
+ char* buf=(char*)alloca(SNAC_SIZE+TLV_HEADER_SIZE*14+MD5_HASH_LENGTH+mir_strlen(username)+client_id_len+30+mir_strlen(language)+mir_strlen(country));
aim_writesnac(0x17,0x02,offset,buf);
- aim_writetlv(0x01,(unsigned short)strlen(username),username,offset,buf);
+ aim_writetlv(0x01,(unsigned short)mir_strlen(username),username,offset,buf);
aim_writetlv(0x25,MD5_HASH_LENGTH,(char*)auth_hash,offset,buf);
aim_writetlv(0x4C,0,0,offset,buf);//signifies new password hash instead of old method
aim_writetlv(0x03,(unsigned short)client_id_len,client_id,offset,buf);
@@ -68,8 +68,8 @@ int CAimProto::aim_auth_request(HANDLE hServerConn,unsigned short &seqno,const c aim_writetlvshort(0x1A,AIM_CLIENT_BUILD_NUMBER,offset,buf);
aim_writetlvshort(0x16,AIM_CLIENT_ID_NUMBER,offset,buf);
aim_writetlvlong(0x14,AIM_CLIENT_DISTRIBUTION_NUMBER,offset,buf);
- aim_writetlv(0x0F,(unsigned short)strlen(language),language,offset,buf);
- aim_writetlv(0x0E,(unsigned short)strlen(country),country,offset,buf);
+ aim_writetlv(0x0F,(unsigned short)mir_strlen(language),language,offset,buf);
+ aim_writetlv(0x0E,(unsigned short)mir_strlen(country),country,offset,buf);
aim_writetlvchar(0x4A,getByte(AIM_KEY_FSC, 0) ? 3 : 1,offset,buf);
// aim_writetlvchar(0x94,0,offset,buf);
if (!getByte(AIM_KEY_DSSL, 0))
@@ -234,7 +234,7 @@ int CAimProto::aim_set_profile(HANDLE hServerConn,unsigned short &seqno, char* a {
aimString str(amsg);
const char *charset = str.isUnicode() ? AIM_MSG_TYPE_UNICODE : AIM_MSG_TYPE;
- const unsigned short charset_len = (unsigned short)strlen(charset);
+ const unsigned short charset_len = (unsigned short)mir_strlen(charset);
const char* msg = str.getBuf();
const unsigned short msg_len = str.getSize();
@@ -356,7 +356,7 @@ int CAimProto::aim_send_message(HANDLE hServerConn,unsigned short &seqno,const c aim_writegeneric(msg_len,msg,tlv_offset,tlv_buf); // message text
unsigned short offset=0;
- unsigned short sn_length=(unsigned short)strlen(sn);
+ unsigned short sn_length=(unsigned short)mir_strlen(sn);
char* buf= (char*)alloca(SNAC_SIZE+8+3+sn_length+TLV_HEADER_SIZE*3+tlv_offset);
aim_writesnac(0x04,0x06,offset,buf,get_random());
@@ -383,7 +383,7 @@ int CAimProto::aim_send_message(HANDLE hServerConn,unsigned short &seqno,const c int CAimProto::aim_query_profile(HANDLE hServerConn,unsigned short &seqno,char* sn)
{
unsigned short offset=0;
- unsigned short sn_length=(unsigned short)strlen(sn);
+ unsigned short sn_length=(unsigned short)mir_strlen(sn);
char* buf=(char*)alloca(SNAC_SIZE+5+sn_length);
aim_writesnac(0x02,0x15,offset,buf);
aim_writelong(0x01,offset,buf);
@@ -396,7 +396,7 @@ int CAimProto::aim_delete_contact(HANDLE hServerConn, unsigned short &seqno, cha unsigned short group_id, unsigned short list, bool nil)
{
unsigned short offset=0;
- unsigned short sn_length=(unsigned short)strlen(sn);
+ unsigned short sn_length=(unsigned short)mir_strlen(sn);
char* buf=(char*)alloca(SNAC_SIZE+sn_length+10);
aim_writesnac(0x13,0x0a,offset,buf, get_random()); // SSI Delete
aim_writeshort(sn_length,offset,buf); // screen name length
@@ -413,7 +413,7 @@ int CAimProto::aim_add_contact(HANDLE hServerConn, unsigned short &seqno, const unsigned short group_id, unsigned short list, char* nick, char* note)
{
unsigned short offset=0;
- unsigned short sn_length=(unsigned short)strlen(sn);
+ unsigned short sn_length=(unsigned short)mir_strlen(sn);
unsigned short nick_length = (unsigned short)mir_strlen(nick);
unsigned short note_length = (unsigned short)mir_strlen(note);
unsigned short tlv_len = nick || note ? TLV_HEADER_SIZE * 2 + nick_length + note_length : 0;
@@ -439,7 +439,7 @@ int CAimProto::aim_mod_group(HANDLE hServerConn, unsigned short &seqno, const ch char* members, unsigned short members_length)
{
unsigned short offset=0;
- unsigned short name_length=(unsigned short)strlen(name);
+ unsigned short name_length=(unsigned short)mir_strlen(name);
char* buf=(char*)alloca(SNAC_SIZE+TLV_HEADER_SIZE+name_length+members_length+10);
aim_writesnac(0x13,0x09,offset,buf, get_random()); // SSI Edit
aim_writeshort(name_length,offset,buf); // group name length
@@ -457,7 +457,7 @@ int CAimProto::aim_mod_buddy(HANDLE hServerConn, unsigned short &seqno, const ch char* nick, char* note)
{
unsigned short offset=0;
- unsigned short sn_length = (unsigned short)strlen(sn);
+ unsigned short sn_length = (unsigned short)mir_strlen(sn);
unsigned short nick_length = (unsigned short)mir_strlen(nick);
unsigned short note_length = (unsigned short)mir_strlen(note);
unsigned short tlv_len = TLV_HEADER_SIZE * 2 + nick_length + note_length;
@@ -574,7 +574,7 @@ int CAimProto::aim_send_file(HANDLE hServerConn, unsigned short &seqno, aimString dscr(ft->message);
const char* charset = dscr.isUnicode() ? "unicode-2-0" : "us-ascii";
- const unsigned short charset_len = (unsigned short)strlen(charset);
+ const unsigned short charset_len = (unsigned short)mir_strlen(charset);
const char* desc_msg = dscr.getBuf();
const unsigned short desc_len = dscr.getSize();
@@ -587,7 +587,7 @@ int CAimProto::aim_send_file(HANDLE hServerConn, unsigned short &seqno, aim_writetlv(0x0f,0,0,frag_offset,msg_frag); // request host check
const char* fname = get_fname(ft->file);
- const unsigned short fnlen = (unsigned short)strlen(fname);
+ const unsigned short fnlen = (unsigned short)mir_strlen(fname);
char* fblock = (char*)alloca(9 + fnlen);
*(unsigned short*)&fblock[0] = _htons(ft->pfts.totalFiles > 1 ? 2 : 1); // single file transfer
@@ -608,7 +608,7 @@ int CAimProto::aim_send_file(HANDLE hServerConn, unsigned short &seqno, }
unsigned short offset=0;
- unsigned short sn_length=(unsigned short)strlen(ft->sn);
+ unsigned short sn_length=(unsigned short)mir_strlen(ft->sn);
char* buf=(char*)alloca(SNAC_SIZE+TLV_HEADER_SIZE*2+12+frag_offset+sn_length);
aim_writesnac(0x04,0x06,offset,buf); // msg to host
aim_writegeneric(8,ft->icbm_cookie,offset,buf); // icbm cookie
@@ -637,7 +637,7 @@ int CAimProto::aim_file_ad(HANDLE hServerConn,unsigned short &seqno,char* sn, ch // if (max_ver > 1)
// aim_writetlvshort(0x12,2,frag_offset,msg_frag); // max protocol version
- unsigned short sn_length=(unsigned short)strlen(sn);
+ unsigned short sn_length=(unsigned short)mir_strlen(sn);
unsigned short offset=0;
char* buf=(char*)alloca(SNAC_SIZE+TLV_HEADER_SIZE+21+frag_offset+sn_length);
aim_writesnac(0x04,0x06,offset,buf); // msg to host
@@ -654,7 +654,7 @@ int CAimProto::aim_file_ad(HANDLE hServerConn,unsigned short &seqno,char* sn, ch int CAimProto::aim_typing_notification(HANDLE hServerConn,unsigned short &seqno,char* sn,unsigned short type)
{
unsigned short offset=0;
- unsigned short sn_length=(unsigned short)strlen(sn);
+ unsigned short sn_length=(unsigned short)mir_strlen(sn);
char* buf= (char*)alloca(SNAC_SIZE+sn_length+13);
aim_writesnac(0x04,0x14,offset,buf);
aim_writegeneric(8,"\0\0\0\0\0\0\0\0",offset,buf); // icbm cookie
@@ -699,7 +699,7 @@ int CAimProto::aim_activate_mail(HANDLE hServerConn,unsigned short &seqno) int CAimProto::aim_request_avatar(HANDLE hServerConn,unsigned short &seqno, const char* sn, unsigned short bart_type, const char* hash, unsigned short hash_size)
{
unsigned short offset=0;
- unsigned char sn_length=(unsigned char)strlen(sn);
+ unsigned char sn_length=(unsigned char)mir_strlen(sn);
char* buf= (char*)alloca(SNAC_SIZE+sn_length+hash_size+12);
aim_writesnac(0x10,0x06,offset,buf);
aim_writechar(sn_length,offset,buf); // screen name length
@@ -715,7 +715,7 @@ int CAimProto::aim_set_avatar_hash(HANDLE hServerConn, unsigned short &seqno, ch char bart_type_txt[8];
ultoa(bart_type, bart_type_txt, 10);
- unsigned short bart_type_len = (unsigned short)strlen(bart_type_txt);
+ unsigned short bart_type_len = (unsigned short)mir_strlen(bart_type_txt);
unsigned short req = 0x09;
if (id == 0)
@@ -751,7 +751,7 @@ int CAimProto::aim_delete_avatar_hash(HANDLE hServerConn, unsigned short &seqno, char bart_type_txt[8];
ultoa(bart_type, bart_type_txt, 10);
- unsigned short bart_type_len = (unsigned short)strlen(bart_type_txt);
+ unsigned short bart_type_len = (unsigned short)mir_strlen(bart_type_txt);
char* buf = (char*)alloca(SNAC_SIZE + 20 + bart_type_len);
aim_writesnac(0x13,0x0a,offset,buf, get_random()); // SSI Delete
@@ -779,7 +779,7 @@ int CAimProto::aim_upload_avatar(HANDLE hServerConn, unsigned short &seqno, unsi int CAimProto::aim_search_by_email(HANDLE hServerConn,unsigned short &seqno, const char* email)
{
unsigned short offset=0;
- char em_length=(char)strlen(email);
+ char em_length=(char)mir_strlen(email);
char* buf= (char*)alloca(SNAC_SIZE+em_length);
aim_writesnac(0x0a,0x02,offset,buf); // Email search
aim_writegeneric(em_length,email,offset,buf);
@@ -797,7 +797,7 @@ int CAimProto::aim_chatnav_request_limits(HANDLE hServerConn,unsigned short &seq int CAimProto::aim_chatnav_create(HANDLE hServerConn,unsigned short &seqno, char* room, unsigned short exchage)
{
//* Join Pseudo Room (Get's the info we need for the real connection)
- unsigned short room_len = (unsigned short)strlen(room);
+ unsigned short room_len = (unsigned short)mir_strlen(room);
unsigned short offset=0;
char* buf=(char*)alloca(SNAC_SIZE+10+room_len+26);
@@ -818,7 +818,7 @@ int CAimProto::aim_chatnav_create(HANDLE hServerConn,unsigned short &seqno, char int CAimProto::aim_chatnav_room_info(HANDLE hServerConn,unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance)
{
unsigned short offset=0;
- unsigned short chat_cookie_len = (unsigned short)strlen(chat_cookie);
+ unsigned short chat_cookie_len = (unsigned short)mir_strlen(chat_cookie);
char* buf=(char*)alloca(SNAC_SIZE+7+chat_cookie_len);
aim_writesnac(0x0d,0x04,offset,buf);
aim_writeshort(exchange,offset,buf); // Exchange
@@ -833,7 +833,7 @@ int CAimProto::aim_chat_join_room(HANDLE hServerConn,unsigned short &seqno, char unsigned short exchange, unsigned short instance, unsigned short id)
{
unsigned short offset=0;
- unsigned short cookie_len = (unsigned short)strlen(chat_cookie);
+ unsigned short cookie_len = (unsigned short)mir_strlen(chat_cookie);
char* buf=(char*)alloca(SNAC_SIZE+TLV_HEADER_SIZE*2+cookie_len+8);
aim_writesnac(0x01,0x04,offset,buf,id);
aim_writeshort(0x0e,offset,buf); // Service request for Chat
@@ -856,7 +856,7 @@ int CAimProto::aim_chat_send_message(HANDLE hServerConn, unsigned short &seqno, aimString str(amsg);
const char* charset = str.isUnicode() ? "unicode-2-0" : "us-ascii";
- const unsigned short chrset_len = (unsigned short)strlen(charset);
+ const unsigned short chrset_len = (unsigned short)mir_strlen(charset);
const char* msg = str.getBuf();
const unsigned short msg_len = str.getSize();
@@ -883,9 +883,9 @@ int CAimProto::aim_chat_send_message(HANDLE hServerConn, unsigned short &seqno, int CAimProto::aim_chat_invite(HANDLE hServerConn,unsigned short &seqno, char* chat_cookie, unsigned short exchange, unsigned short instance, char* sn, char* msg)
{
unsigned short offset=0;
- unsigned short chat_cookie_len = (unsigned short)strlen(chat_cookie);
- unsigned short sn_len = (unsigned short)strlen(sn);
- unsigned short msg_len = (unsigned short)strlen(msg);
+ unsigned short chat_cookie_len = (unsigned short)mir_strlen(chat_cookie);
+ unsigned short sn_len = (unsigned short)mir_strlen(sn);
+ unsigned short msg_len = (unsigned short)mir_strlen(msg);
char* buf=(char*)alloca(SNAC_SIZE+64+chat_cookie_len+sn_len+msg_len);
aim_writesnac(0x04,0x06,offset,buf);
aim_writegeneric(8,"\0\0\0\0\0\0\0\0",offset,buf); // ICBM Cookie
@@ -917,7 +917,7 @@ int CAimProto::aim_chat_invite(HANDLE hServerConn,unsigned short &seqno, char* c int CAimProto::aim_chat_deny(HANDLE hServerConn,unsigned short &seqno,char* sn,char* icbm_cookie)
{
unsigned short offset=0;
- unsigned short sn_length=(unsigned short)strlen(sn);
+ unsigned short sn_length=(unsigned short)mir_strlen(sn);
char* buf=(char*)alloca(SNAC_SIZE+20+sn_length);
aim_writesnac(0x04,0x0b,offset,buf);
aim_writegeneric(8,icbm_cookie,offset,buf); // ICBM Cookie
@@ -945,7 +945,7 @@ int CAimProto::aim_admin_ready(HANDLE hServerConn,unsigned short &seqno) int CAimProto::aim_admin_format_name(HANDLE hServerConn,unsigned short &seqno, const char* sn)
{
unsigned short offset=0;
- unsigned short sn_len = (unsigned short)strlen(sn);
+ unsigned short sn_len = (unsigned short)mir_strlen(sn);
char* buf=(char*)alloca(SNAC_SIZE+TLV_HEADER_SIZE+sn_len);
aim_writesnac(0x07,0x04,offset,buf);
aim_writetlv(0x01,sn_len,sn,offset,buf);
@@ -955,7 +955,7 @@ int CAimProto::aim_admin_format_name(HANDLE hServerConn,unsigned short &seqno, c int CAimProto::aim_admin_change_email(HANDLE hServerConn,unsigned short &seqno, const char* email)
{
unsigned short offset=0;
- unsigned short email_len = (unsigned short)strlen(email);
+ unsigned short email_len = (unsigned short)mir_strlen(email);
char* buf=(char*)alloca(SNAC_SIZE+TLV_HEADER_SIZE+email_len);
aim_writesnac(0x07,0x04,offset,buf);
aim_writetlv(0x11,email_len,email,offset,buf);
@@ -965,8 +965,8 @@ int CAimProto::aim_admin_change_email(HANDLE hServerConn,unsigned short &seqno, int CAimProto::aim_admin_change_password(HANDLE hServerConn,unsigned short &seqno, const char* cur_pw, const char* new_pw)
{
unsigned short offset=0;
- unsigned short cur_pw_len = (unsigned short)strlen(cur_pw);
- unsigned short new_pw_len = (unsigned short)strlen(new_pw);
+ unsigned short cur_pw_len = (unsigned short)mir_strlen(cur_pw);
+ unsigned short new_pw_len = (unsigned short)mir_strlen(new_pw);
char* buf=(char*)alloca(SNAC_SIZE+2*TLV_HEADER_SIZE+cur_pw_len+new_pw_len);
aim_writesnac(0x07,0x04,offset,buf);
aim_writetlv(0x02,new_pw_len,new_pw,offset,buf);
diff --git a/protocols/AimOscar/src/conv.cpp b/protocols/AimOscar/src/conv.cpp index faa4bdc01c..f0458f7fde 100644 --- a/protocols/AimOscar/src/conv.cpp +++ b/protocols/AimOscar/src/conv.cpp @@ -23,10 +23,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. char* process_status_msg (const char *str, const char* sn)
{
const char *src = str;
- size_t size = strlen(src) + 1;
+ size_t size = mir_strlen(src) + 1;
char* res = (char*)mir_alloc(size);
char* dest = res;
- size_t len = strlen(sn);
+ size_t len = mir_strlen(sn);
for (; *src; ++src)
{
@@ -77,7 +77,7 @@ char* process_status_msg (const char *str, const char* sn) void html_decode(char* str)
{
char *p, *q;
-// char *rstr = (char*)mir_alloc(strlen(str)*2);
+// char *rstr = (char*)mir_alloc(mir_strlen(str)*2);
if (str == NULL) return;
@@ -100,7 +100,7 @@ void html_decode(char* str) if (t1 && *t1)
{
strcpy(q, t1);
- q += strlen(t1) - 1;
+ q += mir_strlen(t1) - 1;
}
mir_free(t1);
p = s;
@@ -214,8 +214,8 @@ char* html_to_bbcodes(char *src) }
else
{
- dest=(char*)mir_realloc(dest,strlen(dest)+6);
- memcpy(&dest[strlen(dest)],"[/b]",5);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+6);
+ memcpy(&dest[mir_strlen(dest)],"[/b]",5);
}
}
while ((ptr = strstr(dest, "<I>")) != NULL || (ptr = strstr(dest, "<i>")) != NULL)
@@ -231,8 +231,8 @@ char* html_to_bbcodes(char *src) }
else
{
- dest=(char*)mir_realloc(dest,strlen(dest)+6);
- memcpy(&dest[strlen(dest)],"[/i]",5);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+6);
+ memcpy(&dest[mir_strlen(dest)],"[/i]",5);
}
}
while ((ptr = strstr(dest, "<U>")) != NULL || (ptr = strstr(dest, "<u>")) != NULL)
@@ -248,8 +248,8 @@ char* html_to_bbcodes(char *src) }
else
{
- dest=(char*)mir_realloc(dest,strlen(dest)+6);
- memcpy(&dest[strlen(dest)],"[/u]",5);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+6);
+ memcpy(&dest[mir_strlen(dest)],"[/u]",5);
}
}
while ((ptr = strstr(dest, "<S>")) != NULL || (ptr = strstr(dest, "<s>")) != NULL)
@@ -265,8 +265,8 @@ char* html_to_bbcodes(char *src) }
else
{
- dest=(char*)mir_realloc(dest,strlen(dest)+6);
- memcpy(&dest[strlen(dest)],"[/s]",5);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+6);
+ memcpy(&dest[mir_strlen(dest)],"[/s]",5);
}
}
rptr = dest;
@@ -275,11 +275,11 @@ char* html_to_bbcodes(char *src) char* begin=ptr;
ptrl = ptr + 4;
memcpy(ptrl,"[url=",5);
- memmove(ptr, ptrl, strlen(ptrl) + 1);
+ memmove(ptr, ptrl, mir_strlen(ptrl) + 1);
if ((ptr = strstr(ptrl,">")))
{
ptr-=1;
- memmove(ptr, ptr+1, strlen(ptr+1) + 1);
+ memmove(ptr, ptr+1, mir_strlen(ptr+1) + 1);
*(ptr)=']';
ptrl-=1;
char* s1 = strstr(ptrl,"</A");
@@ -288,7 +288,7 @@ char* html_to_bbcodes(char *src) {
ptr=s1;
ptr=strip_tag_within(begin,ptr);
- memmove(ptr+2, ptr, strlen(ptr) + 1);
+ memmove(ptr+2, ptr, mir_strlen(ptr) + 1);
memcpy(ptr,"[/url]",6);
}
else if (s2&&s2<s1||s2&&!s1)
@@ -296,20 +296,20 @@ char* html_to_bbcodes(char *src) ptr=s2;
ptr=strip_tag_within(begin,ptr);
int addr=ptr-rptr;
- dest=(char*)mir_realloc(dest,strlen(dest)+8);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+8);
rptr=dest;
ptr=rptr+addr;
- memmove(ptr+6, ptr, strlen(ptr) + 1);
+ memmove(ptr+6, ptr, mir_strlen(ptr) + 1);
memcpy(ptr,"[/url]",6);
}
else
{
- strip_tag_within(begin,&dest[strlen(dest)]);
+ strip_tag_within(begin,&dest[mir_strlen(dest)]);
//int addr=ptr-rptr;
- dest=(char*)mir_realloc(dest,strlen(dest)+8);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+8);
rptr=dest;
ptr=dest;
- memcpy(&ptr[strlen(ptr)],"[/url]",7);
+ memcpy(&ptr[mir_strlen(ptr)],"[/url]",7);
}
}
else
@@ -321,11 +321,11 @@ char* html_to_bbcodes(char *src) char* begin=ptr;
ptrl = ptr + 4;
memcpy(ptrl,"[url=",5);
- memmove(ptr, ptrl, strlen(ptrl) + 1);
+ memmove(ptr, ptrl, mir_strlen(ptrl) + 1);
if ((ptr = strstr(ptrl,">")))
{
ptr-=1;
- memmove(ptr, ptr+1, strlen(ptr+1) + 1);
+ memmove(ptr, ptr+1, mir_strlen(ptr+1) + 1);
*(ptr)=']';
ptrl-=1;
char* s1 = strstr(ptrl,"</a");
@@ -334,7 +334,7 @@ char* html_to_bbcodes(char *src) {
ptr=s1;
ptr=strip_tag_within(begin,ptr);
- memmove(ptr+2, ptr, strlen(ptr) + 1);
+ memmove(ptr+2, ptr, mir_strlen(ptr) + 1);
memcpy(ptr,"[/url]",6);
}
else if (s2&&s2<s1||s2&&!s1)
@@ -342,20 +342,20 @@ char* html_to_bbcodes(char *src) ptr=s2;
ptr=strip_tag_within(begin,ptr);
int addr=ptr-rptr;
- dest=(char*)mir_realloc(dest,strlen(dest)+8);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+8);
rptr=dest;
ptr=rptr+addr;
- memmove(ptr+6, ptr, strlen(ptr) + 1);
+ memmove(ptr+6, ptr, mir_strlen(ptr) + 1);
memcpy(ptr,"[/url]",6);
}
else
{
- strip_tag_within(begin,&dest[strlen(dest)]);
+ strip_tag_within(begin,&dest[mir_strlen(dest)]);
//int addr=ptr-rptr;
- dest=(char*)mir_realloc(dest,strlen(dest)+8);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+8);
rptr=dest;
ptr=dest;
- memcpy(&ptr[strlen(ptr)],"[/url]",7);
+ memcpy(&ptr[mir_strlen(ptr)],"[/url]",7);
}
}
else
@@ -365,15 +365,15 @@ char* html_to_bbcodes(char *src) while (ptr = strstr(rptr, "<FONT COLOR=\""))
{
int addr=ptr-rptr;
- dest=(char*)mir_realloc(dest,strlen(dest)+8);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+8);
rptr=dest;
ptr=rptr+addr;
ptrl = ptr + 6;
memcpy(ptrl,"[color=",7);
- memmove(ptr, ptrl, strlen(ptrl) + 1);
+ memmove(ptr, ptrl, mir_strlen(ptrl) + 1);
if ((ptr = strstr(ptrl, ">")))
{
- memmove(ptrl+7,ptr,strlen(ptr)+1);
+ memmove(ptrl+7,ptr,mir_strlen(ptr)+1);
*(ptrl+7)=']';
ptr=ptrl+7;
char* s1 = strstr(ptr,"</FONT");
@@ -381,19 +381,19 @@ char* html_to_bbcodes(char *src) if (s1&&s1<s2||s1&&!s2)
{
ptr=s1;
- memmove(ptr+1, ptr, strlen(ptr) + 1);
+ memmove(ptr+1, ptr, mir_strlen(ptr) + 1);
memcpy(ptr,"[/color]",8);
}
else if (s2&&s2<s1||s2&&!s1)
{
ptr=s2;
- memmove(ptr+8, ptr, strlen(ptr) + 1);
+ memmove(ptr+8, ptr, mir_strlen(ptr) + 1);
memcpy(ptr,"[/color]",8);
}
else
{
ptr=dest;
- memcpy(&ptr[strlen(ptr)],"[/color]",9);
+ memcpy(&ptr[mir_strlen(ptr)],"[/color]",9);
}
}
else
@@ -403,15 +403,15 @@ char* html_to_bbcodes(char *src) while (ptr = strstr(rptr, "<font color=\""))
{
int addr=ptr-rptr;
- dest=(char*)mir_realloc(dest,strlen(dest)+8);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+8);
rptr=dest;
ptr=rptr+addr;
ptrl = ptr + 6;
memcpy(ptrl,"[color=",7);
- memmove(ptr, ptrl, strlen(ptrl) + 1);
+ memmove(ptr, ptrl, mir_strlen(ptrl) + 1);
if ((ptr = strstr(ptrl, ">")))
{
- memmove(ptrl+7,ptr,strlen(ptr)+1);
+ memmove(ptrl+7,ptr,mir_strlen(ptr)+1);
*(ptrl+7)=']';
ptr=ptrl+7;
char* s1 = strstr(ptr,"</font");
@@ -419,19 +419,19 @@ char* html_to_bbcodes(char *src) if (s1&&s1<s2||s1&&!s2)
{
ptr=s1;
- memmove(ptr+1, ptr, strlen(ptr) + 1);
+ memmove(ptr+1, ptr, mir_strlen(ptr) + 1);
memcpy(ptr,"[/color]",8);
}
else if (s2&&s2<s1||s2&&!s1)
{
ptr=s2;
- memmove(ptr+8, ptr, strlen(ptr) + 1);
+ memmove(ptr+8, ptr, mir_strlen(ptr) + 1);
memcpy(ptr,"[/color]",8);
}
else
{
ptr=dest;
- memcpy(&ptr[strlen(ptr)],"[/color]",9);
+ memcpy(&ptr[mir_strlen(ptr)],"[/color]",9);
}
}
else
@@ -441,23 +441,23 @@ char* html_to_bbcodes(char *src) while ((ptr = strstr(rptr, "<FONT COLOR=")) || (ptr = strstr(rptr, "<font color=")))
{
int addr=ptr-rptr;
- dest=(char*)mir_realloc(dest,strlen(dest)+8);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+8);
rptr=dest;
ptr=rptr+addr;
ptrl = ptr + 5;
memcpy(ptrl,"[color=",7);
- memmove(ptr, ptrl, strlen(ptrl) + 1);
+ memmove(ptr, ptrl, mir_strlen(ptrl) + 1);
if ((ptr = strstr(ptrl, ">")))
{
*(ptr)=']';
if ((ptrl = strstr(ptr, "</FONT")) || (ptrl = strstr(ptr, "</font")))
{
- memmove(ptrl+1, ptrl, strlen(ptrl) + 1);
+ memmove(ptrl+1, ptrl, mir_strlen(ptrl) + 1);
memcpy(ptrl,"[/color]",8);
}
else
{
- memcpy(&dest[strlen(dest)],"[/color]",9);
+ memcpy(&dest[mir_strlen(dest)],"[/color]",9);
}
}
else
@@ -470,12 +470,12 @@ char* html_to_bbcodes(char *src) int addr=ptr-rptr;
int len=0;
for (len
- dest=(char*)mir_realloc(dest,strlen(dest)+8);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+8);
rptr=dest;
ptr=rptr+addr;
ptrl = ptr + 5;
memcpy(ptrl,"[url=",7);
- memmove(ptr, ptrl, strlen(ptrl) + 1);
+ memmove(ptr, ptrl, mir_strlen(ptrl) + 1);
}
*/
return dest;
@@ -538,10 +538,10 @@ char* bbcodes_to_html(const char *src) while ((ptr = strstr(rptr, "[color=")))
{
int addr=ptr-rptr;
- dest=(char*)mir_realloc(dest,strlen(dest)+8);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+8);
rptr=dest;
ptr=rptr+addr;
- memmove(ptr+5, ptr, strlen(ptr) + 1);
+ memmove(ptr+5, ptr, mir_strlen(ptr) + 1);
memcpy(ptr,"<font ",6);
if ((ptr = strstr(ptr,"]")))
{
@@ -549,7 +549,7 @@ char* bbcodes_to_html(const char *src) if ((ptr = strstr(ptr,"[/color]")))
{
memcpy(ptr,"</font>",7);
- memmove(ptr+7,ptr+8,strlen(ptr+8)+1);
+ memmove(ptr+7,ptr+8,mir_strlen(ptr+8)+1);
}
}
else
@@ -558,10 +558,10 @@ char* bbcodes_to_html(const char *src) while ((ptr = strstr(rptr, "[url=")))
{
int addr=ptr-rptr;
- dest=(char*)mir_realloc(dest,strlen(dest)+8);
+ dest=(char*)mir_realloc(dest,mir_strlen(dest)+8);
rptr=dest;
ptr=rptr+addr;
- memmove(ptr+3, ptr, strlen(ptr)+1);
+ memmove(ptr+3, ptr, mir_strlen(ptr)+1);
memcpy(ptr,"<a href",7);
if ((ptr = strstr(ptr, "]")))
{
@@ -569,7 +569,7 @@ char* bbcodes_to_html(const char *src) if ((ptr = strstr(ptr, "[/url]")))
{
memcpy(ptr,"</a>",4);
- memmove(ptr+4,ptr+6,strlen(ptr+6)+1);
+ memmove(ptr+4,ptr+6,mir_strlen(ptr+6)+1);
}
}
else
@@ -580,7 +580,7 @@ char* bbcodes_to_html(const char *src) void strip_tag(char* begin, char* end)
{
- memmove(begin,end+1,strlen(end+1)+1);
+ memmove(begin,end+1,mir_strlen(end+1)+1);
}
//strip a tag within a string
@@ -719,7 +719,7 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) strcpy(&buf[pos]," face=\"");
pos+=7;
strcpy(&buf[pos],Face);
- pos+=strlen(Face);
+ pos+=mir_strlen(Face);
strcpy(&buf[pos],"\"");
pos++;
if (!(cfOld.dwEffects & CFE_AUTOBACKCOLOR))
@@ -728,7 +728,7 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) pos+=6;
char chBackColor[7];
_itoa((_htonl(BackColor)>>8),chBackColor,16);
- size_t len=strlen(chBackColor);
+ size_t len=mir_strlen(chBackColor);
if (len<6)
{
memmove(chBackColor+(6-len),chBackColor,len+1);
@@ -744,7 +744,7 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) pos+=8;
char chColor[7];
_itoa((_htonl(Color)>>8),chColor,16);
- size_t len=strlen(chColor);
+ size_t len=mir_strlen(chColor);
if (len<6)
{
memmove(chColor+(6-len),chColor,len+1);
@@ -773,7 +773,7 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) {
char* txt = mir_utf8encodeT(text);
strcpy(&buf[pos], txt);
- pos += strlen(txt);
+ pos += mir_strlen(txt);
mir_free(txt);
}
start++;
@@ -832,7 +832,7 @@ void string_to_bytes(char* string, char* bytes) {
char sbyte[3];
sbyte[2]='\0';
- size_t length=strlen(string);
+ size_t length=mir_strlen(string);
for (size_t i=0; i<length; i+=2)
{
sbyte[0]=string[i];
@@ -894,7 +894,7 @@ aimString::aimString(char* str) else
{
szString = mir_utf8decodeA(str);
- size = strlen(szString);
+ size = mir_strlen(szString);
}
}
}
diff --git a/protocols/AimOscar/src/file.cpp b/protocols/AimOscar/src/file.cpp index 300561e408..b8eb1840f0 100644 --- a/protocols/AimOscar/src/file.cpp +++ b/protocols/AimOscar/src/file.cpp @@ -123,7 +123,7 @@ bool setup_next_file_send(file_transfer *ft) char* fname = mir_utf8encodeT(file);
if (ft->pfts.totalFiles > 1 && ft->file[0])
{
- size_t dlen = strlen(ft->file);
+ size_t dlen = mir_strlen(ft->file);
if (strncmp(fname, ft->file, dlen) == 0 && fname[dlen] == '\\')
{
fnamea = &fname[dlen+1];
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index b3b404cced..d68cf33608 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -162,8 +162,8 @@ HANDLE __cdecl CAimProto::FileAllow(MCONTACT, HANDLE hTransfer, const PROTOCHAR* if (ft->pfts.totalFiles > 1 && ft->file[0])
{
- size_t path_len = strlen(path);
- size_t len = strlen(ft->file) + 2;
+ size_t path_len = mir_strlen(path);
+ size_t len = mir_strlen(ft->file) + 2;
path = (char*)mir_realloc(path, path_len + len);
mir_snprintf(&path[path_len], len, "%s\\", ft->file);
@@ -305,7 +305,7 @@ void __cdecl CAimProto::basic_search_ack_success(void* p) char *sn = normalize_name((char*)p);
if (sn) // normalize it
{
- if (strlen(sn) > 32)
+ if (mir_strlen(sn) > 32)
{
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
diff --git a/protocols/AimOscar/src/proxy.cpp b/protocols/AimOscar/src/proxy.cpp index 7cfaa76e19..3ed34d54af 100644 --- a/protocols/AimOscar/src/proxy.cpp +++ b/protocols/AimOscar/src/proxy.cpp @@ -137,7 +137,7 @@ void __cdecl CAimProto::aim_proxy_helper(void* param) int proxy_initialize_send(HANDLE connection, char* sn, char* cookie)
{
- const char sn_length = (char)strlen(sn);
+ const char sn_length = (char)mir_strlen(sn);
const int len = sn_length + 21 + TLV_HEADER_SIZE + AIM_CAPS_LENGTH;
char* buf= (char*)alloca(len);
@@ -155,7 +155,7 @@ int proxy_initialize_send(HANDLE connection, char* sn, char* cookie) int proxy_initialize_recv(HANDLE connection,char* sn, char* cookie,unsigned short port_check)
{
- const char sn_length = (char)strlen(sn);
+ const char sn_length = (char)mir_strlen(sn);
const int len = sn_length + 23 + TLV_HEADER_SIZE + AIM_CAPS_LENGTH;
char* buf= (char*)alloca(len);
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp index 672beff746..3ae332dc39 100644 --- a/protocols/AimOscar/src/server.cpp +++ b/protocols/AimOscar/src/server.cpp @@ -1265,7 +1265,7 @@ void CAimProto::snac_received_message(SNAC &snac,HANDLE hServerConn,unsigned sho if (channel == 1) { //Message not file
if (auto_response) { //this message must be an autoresponse
char* away = mir_utf8encodeT(TranslateT("[Auto-Response]:"));
- size_t len = strlen(msg_buf) + strlen(away) + 2;
+ size_t len = mir_strlen(msg_buf) + mir_strlen(away) + 2;
char* buf = (char*)mir_alloc(len);
mir_snprintf(buf, len, "%s %s", away, msg_buf);
mir_free(away);
@@ -1292,7 +1292,7 @@ void CAimProto::snac_received_message(SNAC &snac,HANDLE hServerConn,unsigned sho char* s_msg = process_status_msg(*msgptr, sn);
char* away = mir_utf8encodeT(TranslateT("[Auto-Response]:"));
- size_t len = strlen(s_msg) + strlen(away) + 2;
+ size_t len = mir_strlen(s_msg) + mir_strlen(away) + 2;
char* buf = (char*)alloca(len);
mir_snprintf(buf, len, "%s %s", away, s_msg);
mir_free(away);
diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp index bef02edf15..a01c6e54d7 100644 --- a/protocols/AimOscar/src/ui.cpp +++ b/protocols/AimOscar/src/ui.cpp @@ -624,7 +624,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L cf.dwEffects=0;
char chsize[5] = "";
SendDlgItemMessage(hwndDlg, IDC_FONTSIZE, CB_GETLBTEXT, SendDlgItemMessage(hwndDlg, IDC_FONTSIZE, CB_GETCURSEL, 0, 0),(LPARAM)chsize);
- //strlcpy(cf.szFaceName,size,strlen(size)+1);
+ //strlcpy(cf.szFaceName,size,mir_strlen(size)+1);
cf.yHeight=atoi(chsize)*20;
SendDlgItemMessage(hwndDlg, IDC_PROFILE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf);
SetFocus(GetDlgItem(hwndDlg, IDC_PROFILE));
@@ -692,7 +692,7 @@ INT_PTR CALLBACK admin_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar char name[64];
GetDlgItemTextA(hwndDlg, IDC_FNAME, name, SIZEOF(name));
- if (strlen(trim_str(name)) > 0 && !ppro->getString(AIM_KEY_SN, &dbv))
+ if (mir_strlen(trim_str(name)) > 0 && !ppro->getString(AIM_KEY_SN, &dbv))
{
if (strcmp(name, dbv.pszVal))
ppro->aim_admin_format_name(ppro->hAdminConn,ppro->admin_seqno,name);
@@ -701,7 +701,7 @@ INT_PTR CALLBACK admin_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar char email[254];
GetDlgItemTextA(hwndDlg, IDC_CEMAIL, email, SIZEOF(email));
- if (strlen(trim_str(email)) > 1 && !ppro->getString(AIM_KEY_EM, &dbv)) // Must be greater than 1 or a SNAC error is thrown.
+ if (mir_strlen(trim_str(email)) > 1 && !ppro->getString(AIM_KEY_EM, &dbv)) // Must be greater than 1 or a SNAC error is thrown.
{
if (strcmp(email, dbv.pszVal))
ppro->aim_admin_change_email(ppro->hAdminConn,ppro->admin_seqno,email);
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp index 67a9e26c69..ea7dafe878 100644 --- a/protocols/AimOscar/src/utility.cpp +++ b/protocols/AimOscar/src/utility.cpp @@ -346,7 +346,7 @@ char *normalize_name(const char *s) char* trim_str(char* s)
{
if (s == NULL) return NULL;
- size_t len = strlen(s);
+ size_t len = mir_strlen(s);
while (len)
{
@@ -357,7 +357,7 @@ char* trim_str(char* s) char* sc = s;
while (isspace(*sc)) ++sc;
- memcpy(s,sc,strlen(sc)+1);
+ memcpy(s,sc,mir_strlen(sc)+1);
return s;
}
@@ -568,9 +568,9 @@ void CAimProto::write_away_message(const char* sn, const char* msg, bool utf) if (utf) _write(fid, "\xEF\xBB\xBF", 3);
char* s_msg=process_status_msg(msg, sn);
_write(fid, "<h3>", 4);
- _write(fid, sn, (unsigned)strlen(sn));
+ _write(fid, sn, (unsigned)mir_strlen(sn));
_write(fid, "'s Away Message:</h3>", 21);
- _write(fid, s_msg, (unsigned)strlen(s_msg));
+ _write(fid, s_msg, (unsigned)mir_strlen(s_msg));
_close(fid);
ShellExecute(NULL, _T("open"), path, NULL, NULL, SW_SHOW);
mir_free(path);
@@ -587,9 +587,9 @@ void CAimProto::write_profile(const char* sn, const char* msg, bool utf) if (utf) _write(fid, "\xEF\xBB\xBF", 3);
char* s_msg=process_status_msg(msg, sn);
_write(fid, "<h3>", 4);
- _write(fid, sn, (unsigned)strlen(sn));
+ _write(fid, sn, (unsigned)mir_strlen(sn));
_write(fid, "'s Profile:</h3>", 16);
- _write(fid, s_msg, (unsigned)strlen(s_msg));
+ _write(fid, s_msg, (unsigned)mir_strlen(s_msg));
_close(fid);
ShellExecute(NULL, _T("open"), path, NULL, NULL, SW_SHOW);
mir_free(path);
@@ -646,7 +646,7 @@ char* long_ip_to_char_ip(unsigned long host, char* ip) {
char store[16];
_itoa(bytes[i], store, 10);
- size_t len = strlen(store);
+ size_t len = mir_strlen(store);
memcpy(&ip[buf_loc], store, len);
buf_loc += len;
|