diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 19:52:29 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 19:52:29 +0000 |
commit | babf7873a3fe373d60ef22b1b671d98e014d8819 (patch) | |
tree | e21dfdb68839616efbbd884dfa77a1745f1c35d7 /protocols/AimOscar | |
parent | a89887eb202c99ce09107668561abce6704f9004 (diff) |
replace strcpy to mir_strcpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar')
-rw-r--r-- | protocols/AimOscar/src/conv.cpp | 88 | ||||
-rw-r--r-- | protocols/AimOscar/src/server.cpp | 64 |
2 files changed, 76 insertions, 76 deletions
diff --git a/protocols/AimOscar/src/conv.cpp b/protocols/AimOscar/src/conv.cpp index 75c95e2cc7..c63010341b 100644 --- a/protocols/AimOscar/src/conv.cpp +++ b/protocols/AimOscar/src/conv.cpp @@ -99,7 +99,7 @@ void html_decode(char* str) char *t1 = mir_utf8encodeW(t);
if (t1 && *t1)
{
- strcpy(q, t1);
+ mir_strcpy(q, t1);
q += mir_strlen(t1) - 1;
}
mir_free(t1);
@@ -112,30 +112,30 @@ void html_decode(char* str) }
else if ( *p == '<' )
{
- if ( !strnicmp( p, "<p>", 3 )) { strcpy(q, "\r\n\r\n"); q += 3; p += 2; }
- else if ( !strnicmp( p, "</p>", 4 )) { strcpy(q, "\r\n\r\n"); q += 3; p += 3; }
- else if ( !strnicmp( p, "<br>", 4 )) { strcpy(q, "\r\n"); ++q; p += 3; }
- else if ( !strnicmp( p, "<br />", 6 )) { strcpy(q, "\r\n"); ++q; p += 5; }
- else if ( !strnicmp( p, "<hr>", 4 )) { strcpy(q, "\r\n"); ++q; p += 3; }
- else if ( !strnicmp( p, "<hr />", 6 )) { strcpy(q, "\r\n"); ++q; p += 5; }
+ if ( !strnicmp( p, "<p>", 3 )) { mir_strcpy(q, "\r\n\r\n"); q += 3; p += 2; }
+ else if ( !strnicmp( p, "</p>", 4 )) { mir_strcpy(q, "\r\n\r\n"); q += 3; p += 3; }
+ else if ( !strnicmp( p, "<br>", 4 )) { mir_strcpy(q, "\r\n"); ++q; p += 3; }
+ else if ( !strnicmp( p, "<br />", 6 )) { mir_strcpy(q, "\r\n"); ++q; p += 5; }
+ else if ( !strnicmp( p, "<hr>", 4 )) { mir_strcpy(q, "\r\n"); ++q; p += 3; }
+ else if ( !strnicmp( p, "<hr />", 6 )) { mir_strcpy(q, "\r\n"); ++q; p += 5; }
/*
- else if ( !strnicmp( p, "<b>", 3 )) { strcpy(q, "[b]"); q += 2; p += 2; }
- else if ( !strnicmp( p, "</b>", 4 )) { strcpy(q, "[/b]"); q += 3; p += 3; }
- else if ( !strnicmp( p, "<u>", 3 )) { strcpy(q, "[u]"); q += 2; p += 2; }
- else if ( !strnicmp( p, "</u>", 4 )) { strcpy(q, "[/u]"); q += 3; p += 3; }
- else if ( !strnicmp( p, "<i>", 3 )) { strcpy(q, "[i]"); q += 2; p += 2; }
- else if ( !strnicmp( p, "</i>", 4 )) { strcpy(q, "[/i]"); q += 3; p += 3; }
- else if ( !strnicmp( p, "<s>", 3 )) { strcpy(q, "[s]"); q += 2; p += 2; }
- else if ( !strnicmp( p, "</s>", 4 )) { strcpy(q, "[/s]"); q += 3; p += 3; }
+ else if ( !strnicmp( p, "<b>", 3 )) { mir_strcpy(q, "[b]"); q += 2; p += 2; }
+ else if ( !strnicmp( p, "</b>", 4 )) { mir_strcpy(q, "[/b]"); q += 3; p += 3; }
+ else if ( !strnicmp( p, "<u>", 3 )) { mir_strcpy(q, "[u]"); q += 2; p += 2; }
+ else if ( !strnicmp( p, "</u>", 4 )) { mir_strcpy(q, "[/u]"); q += 3; p += 3; }
+ else if ( !strnicmp( p, "<i>", 3 )) { mir_strcpy(q, "[i]"); q += 2; p += 2; }
+ else if ( !strnicmp( p, "</i>", 4 )) { mir_strcpy(q, "[/i]"); q += 3; p += 3; }
+ else if ( !strnicmp( p, "<s>", 3 )) { mir_strcpy(q, "[s]"); q += 2; p += 2; }
+ else if ( !strnicmp( p, "</s>", 4 )) { mir_strcpy(q, "[/s]"); q += 3; p += 3; }
else if ( !strnicmp( p, "<a href", 7 )) {
- strcpy(q, "[url"); q += 4; p += 7;
+ mir_strcpy(q, "[url"); q += 4; p += 7;
while (*p != '>' && *p) *(q++) = *(p++);
*q = ']'; --p;
}
else if ( !strnicmp( p, "<font", 5 )) {
char *l = strchr(p, '>');
- strcpy(q, "[url"); q += 4; p += 7;
+ mir_strcpy(q, "[url"); q += 4; p += 7;
while (*p != '>' && *p) *(q++) = *(p++);
*q = ']'; --p;
}
@@ -175,7 +175,7 @@ char* html_encode(const char* str) }
s = (char*)mir_alloc(c + 27);
- strcpy(s, "<HTML><BODY>");
+ mir_strcpy(s, "<HTML><BODY>");
for ( p=str,q=s+12; *p!='\0'; p++ )
{
switch ( *p )
@@ -190,7 +190,7 @@ char* html_encode(const char* str) default: *q = *p; ++q; break;
}
}
- strcpy(q, "</BODY></HTML>");
+ mir_strcpy(q, "</BODY></HTML>");
return s;
}
@@ -657,14 +657,14 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) Bold=isBold;
if (isBold)
{
- strcpy(&buf[pos],"<b>");
+ mir_strcpy(&buf[pos],"<b>");
pos+=3;
}
else
{
if (start!=0)
{
- strcpy(&buf[pos],"</b>");
+ mir_strcpy(&buf[pos],"</b>");
pos+=4;
}
}
@@ -674,14 +674,14 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) Italic=isItalic;
if (isItalic)
{
- strcpy(&buf[pos],"<i>");
+ mir_strcpy(&buf[pos],"<i>");
pos+=3;
}
else
{
if (start!=0)
{
- strcpy(&buf[pos],"</i>");
+ mir_strcpy(&buf[pos],"</i>");
pos+=4;
}
}
@@ -691,14 +691,14 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) Underline=isUnderline;
if (isUnderline)
{
- strcpy(&buf[pos],"<u>");
+ mir_strcpy(&buf[pos],"<u>");
pos+=3;
}
else
{
if (start!=0)
{
- strcpy(&buf[pos],"</u>");
+ mir_strcpy(&buf[pos],"</u>");
pos+=4;
}
}
@@ -708,23 +708,23 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) Size=isSize;
Color=isColor;
BackColor=isBackColor;
- strcpy(Face,cfOld.szFaceName);
+ mir_strcpy(Face,cfOld.szFaceName);
if (start!=0)
{
- strcpy(&buf[pos],"</font>");
+ mir_strcpy(&buf[pos],"</font>");
pos+=7;
}
- strcpy(&buf[pos],"<font");
+ mir_strcpy(&buf[pos],"<font");
pos+=5;
- strcpy(&buf[pos]," face=\"");
+ mir_strcpy(&buf[pos]," face=\"");
pos+=7;
- strcpy(&buf[pos],Face);
+ mir_strcpy(&buf[pos],Face);
pos+=mir_strlen(Face);
- strcpy(&buf[pos],"\"");
+ mir_strcpy(&buf[pos],"\"");
pos++;
if (!(cfOld.dwEffects & CFE_AUTOBACKCOLOR))
{
- strcpy(&buf[pos]," back=#");
+ mir_strcpy(&buf[pos]," back=#");
pos+=6;
char chBackColor[7];
_itoa((_htonl(BackColor)>>8),chBackColor,16);
@@ -735,12 +735,12 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) for(int i=0;i<6;i++)
chBackColor[i]='0';
}
- strcpy(&buf[pos],chBackColor);
+ mir_strcpy(&buf[pos],chBackColor);
pos+=6;
}
if (!(cfOld.dwEffects & CFE_AUTOCOLOR))
{
- strcpy(&buf[pos]," color=#");
+ mir_strcpy(&buf[pos]," color=#");
pos+=8;
char chColor[7];
_itoa((_htonl(Color)>>8),chColor,16);
@@ -751,28 +751,28 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) for(int i=0;i<6;i++)
chColor[i]='0';
}
- strcpy(&buf[pos],chColor);
+ mir_strcpy(&buf[pos],chColor);
pos+=6;
}
- strcpy(&buf[pos]," size=");
+ mir_strcpy(&buf[pos]," size=");
pos+=6;
char chSize[2];
_itoa(Size,chSize,10);
- strcpy(&buf[pos],chSize);
+ mir_strcpy(&buf[pos],chSize);
pos++;
- strcpy(&buf[pos],">");
+ mir_strcpy(&buf[pos],">");
pos++;
}
if (text[0]=='\r')
{
- strcpy(&buf[pos],"<br>");
+ mir_strcpy(&buf[pos],"<br>");
pos+=4;
}
else
{
T2Utf txt(text);
- strcpy(&buf[pos], txt);
+ mir_strcpy(&buf[pos], txt);
pos += mir_strlen(txt);
}
start++;
@@ -780,20 +780,20 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) }
if (Bold)
{
- strcpy(&buf[pos],"</b>");
+ mir_strcpy(&buf[pos],"</b>");
pos+=4;
}
if (Italic)
{
- strcpy(&buf[pos],"</i>");
+ mir_strcpy(&buf[pos],"</i>");
pos+=4;
}
if (Underline)
{
- strcpy(&buf[pos],"</u>");
+ mir_strcpy(&buf[pos],"</u>");
pos+=4;
}
- strcpy(&buf[pos],"</font>");
+ mir_strcpy(&buf[pos],"</font>");
pos+=7;
SendDlgItemMessage(hwndDlg, DlgItem, EM_SETSEL, oldstart, oldend);
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp index a48b25df92..2548838fa8 100644 --- a/protocols/AimOscar/src/server.cpp +++ b/protocols/AimOscar/src/server.cpp @@ -280,12 +280,12 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003 if (bot)
{
- strcpy(client,CLIENT_BOT);
+ mir_strcpy(client,CLIENT_BOT);
bot_user=1;
}
if (wireless)
{
- strcpy(client,CLIENT_SMS);
+ mir_strcpy(client,CLIENT_SMS);
wireless_user=1;
}
else if (away)
@@ -356,31 +356,31 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003 }
else if (memcmp(cap, "Kopete ICQ", 10) == 0)
{
- strcpy(client,CLIENT_KOPETE);
+ mir_strcpy(client,CLIENT_KOPETE);
}
else if (memcmp(&cap[7], "QIP", 3) == 0)
{
- strcpy(client,CLIENT_QIP);
+ mir_strcpy(client,CLIENT_QIP);
}
else if (memcmp(cap, "mICQ", 4) == 0)
{
- strcpy(client,CLIENT_MICQ);
+ mir_strcpy(client,CLIENT_MICQ);
}
else if (cap_cmp(cap, AIM_CAP_IM2) == 0)
{
- strcpy(client,CLIENT_IM2);
+ mir_strcpy(client,CLIENT_IM2);
}
else if (memcmp(cap, "SIM client", 10) == 0)
{
- strcpy(client,CLIENT_SIM);
+ mir_strcpy(client,CLIENT_SIM);
}
else if (memcmp(cap+4, "naim", 4) == 0)
{
- strcpy(client,CLIENT_NAIM);
+ mir_strcpy(client,CLIENT_NAIM);
}
else if (memcmp(cap, "digsby", 6) == 0)
{
- strcpy(client,CLIENT_DIGSBY);
+ mir_strcpy(client,CLIENT_DIGSBY);
}
mir_free(cap);
}
@@ -432,7 +432,7 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003 O1ff=1;
if (cap==0x1323)
{
- strcpy(client,CLIENT_GPRS);
+ mir_strcpy(client,CLIENT_GPRS);
hiptop_user=1;
}
if (cap==0x1341)
@@ -455,52 +455,52 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003 l34e=1;
}
if (f002&&f003&&f004&&f005)
- strcpy(client,CLIENT_TRILLIAN_PRO);
+ mir_strcpy(client,CLIENT_TRILLIAN_PRO);
else if ((f004&&f005&&f007&&f008) || (f004&&f005&&O104&&O105))
- strcpy(client,CLIENT_ICHAT);
+ mir_strcpy(client,CLIENT_ICHAT);
else if (f003&f004&f005)
- strcpy(client,CLIENT_TRILLIAN);
+ mir_strcpy(client,CLIENT_TRILLIAN);
else if (l343&&O1ff&&tlv.len()==4)
- strcpy(client,CLIENT_TRILLIAN_ASTRA);
+ mir_strcpy(client,CLIENT_TRILLIAN_ASTRA);
else if (l343&&tlv.len()==2)
- strcpy(client,CLIENT_AIMTOC);
+ mir_strcpy(client,CLIENT_AIMTOC);
else if (l343&&l345&&l346&&tlv.len()==6)
- strcpy(client,CLIENT_GAIM);
+ mir_strcpy(client,CLIENT_GAIM);
else if (l343&&l345&&l346&&l34e&&tlv.len()==8)
- strcpy(client,CLIENT_PURPLE);
+ mir_strcpy(client,CLIENT_PURPLE);
else if (l343&&l345&&l346&&l349&&l34e&&tlv.len()==10)
- strcpy(client,CLIENT_PURPLE);
+ mir_strcpy(client,CLIENT_PURPLE);
else if (l343&&l345&&l34e&&tlv.len()==6)
- strcpy(client,CLIENT_ADIUM);
+ mir_strcpy(client,CLIENT_ADIUM);
else if (l343&&l346&&l34e&&tlv.len()==6)
- strcpy(client,CLIENT_TERRAIM);
+ mir_strcpy(client,CLIENT_TERRAIM);
else if (tlv.len()==0 && getWord(hContact, AIM_KEY_ST,0)!=ID_STATUS_ONTHEPHONE)
- strcpy(client,CLIENT_AIMEXPRESS5);
+ mir_strcpy(client,CLIENT_AIMEXPRESS5);
else if (l34b&&l343&&O1ff&&l345&&l346&&tlv.len()==10)
- strcpy(client,CLIENT_AIMEXPRESS6);
+ mir_strcpy(client,CLIENT_AIMEXPRESS6);
else if (l34b&&l341&&l343&&O1ff&&l345&&l346&&l347)
- strcpy(client,CLIENT_AIM5);
+ mir_strcpy(client,CLIENT_AIM5);
else if (l34b&&l341&&l343&&l345&l346&&l347&&l348)
- strcpy(client,CLIENT_AIM4);
+ mir_strcpy(client,CLIENT_AIM4);
else if (O1ff&&l343&&O107&&l341&&O104&&O105&&O101&&l346)
{
if (O10d)
- strcpy(client,CLIENT_AIM6_9);
+ mir_strcpy(client,CLIENT_AIM6_9);
else if (O10c)
- strcpy(client,CLIENT_AIM6_8);
+ mir_strcpy(client,CLIENT_AIM6_8);
else if (O10a)
- strcpy(client,CLIENT_AIM6_5);
+ mir_strcpy(client,CLIENT_AIM6_5);
else
- strcpy(client,CLIENT_AIM_TRITON);
+ mir_strcpy(client,CLIENT_AIM_TRITON);
}
else if (O1ff&&l343&&l341&&O104&&O105&&O101&&l346)
- strcpy(client,CLIENT_AIM7_0);
+ mir_strcpy(client,CLIENT_AIM7_0);
else if (l346&&l34e&&tlv.len()==4)
- strcpy(client,CLIENT_MEEBO);
+ mir_strcpy(client,CLIENT_MEEBO);
else if (l34e&&tlv.len()==2)
- strcpy(client,CLIENT_BEEJIVE);
+ mir_strcpy(client,CLIENT_BEEJIVE);
else if (l34e&&l343&&tlv.len()==4)
- strcpy(client,CLIENT_BEEJIVE);
+ mir_strcpy(client,CLIENT_BEEJIVE);
// setByte(hContact, AIM_KEY_US, utf8);
}
|