From b67c40f21c0fe0c80a3ddd31b0b09f71bf5d97d7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 14 Aug 2013 19:04:55 +0000 Subject: mir_*printf patch for protocols git-svn-id: http://svn.miranda-ng.org/main/trunk@5690 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tlen/src/tlen_picture.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/Tlen/src/tlen_picture.cpp') diff --git a/protocols/Tlen/src/tlen_picture.cpp b/protocols/Tlen/src/tlen_picture.cpp index 41a5315480..f6d896aa2e 100644 --- a/protocols/Tlen/src/tlen_picture.cpp +++ b/protocols/Tlen/src/tlen_picture.cpp @@ -34,7 +34,7 @@ static void LogPictureMessage(TlenProtocol *proto, const char *jid, const char * { char message[1024]; const char *msg = isSent ? LPGEN("Image sent file://%s") : LPGEN("Image received file://%s"); - _snprintf(message, sizeof(message), Translate(msg), filename); + mir_snprintf(message, sizeof(message), Translate(msg), filename); TlenLogMessage(proto, JabberHContactFromJID(proto, jid), isSent ? DBEF_SENT : 0, message); } @@ -49,7 +49,7 @@ static void TlenPsPostThread(void *ptr) { DWORD ret; item->ft->s = socket; item->ft->hFileEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - _snprintf(header, sizeof(header), "", proto->threadData->username, item->ft->jid, item->ft->fileTotalSize, item->jid); + mir_snprintf(header, sizeof(header), "", proto->threadData->username, item->ft->jid, item->ft->fileTotalSize, item->jid); JabberWsSend(proto, socket, header, (int)strlen(header)); ret = WaitForSingleObject(item->ft->hFileEvent, 1000 * 60 * 5); if (ret == WAIT_OBJECT_0) { @@ -58,7 +58,7 @@ static void TlenPsPostThread(void *ptr) { int i; char header[512]; char fileBuffer[2048]; - _snprintf(header, sizeof(header), "", item->ft->iqId, item->jid); + mir_snprintf(header, sizeof(header), "", item->ft->iqId, item->jid); JabberWsSend(proto, socket, header, (int)strlen(header)); JabberLog(proto, "Sending picture data..."); for (i = item->ft->filesSize[0]; i > 0; ) { @@ -114,7 +114,7 @@ static void TlenPsGetThread(void *ptr) { char header[512]; char fileBuffer[2048]; JabberXmlInitState(&xmlState); - _snprintf(header, sizeof(header), "", proto->threadData->username, item->ft->jid, item->jid, item->ft->id2); + mir_snprintf(header, sizeof(header), "", proto->threadData->username, item->ft->jid, item->jid, item->ft->id2); JabberWsSend(proto, socket, header, (int)strlen(header)); JabberLog(proto, "Reveiving picture data..."); { @@ -221,7 +221,7 @@ void TlenProcessPic(XmlNode *node, TlenProtocol *proto) { char fileName[MAX_PATH]; char *ext = JabberXmlGetAttrValue(node, "ext"); char *tmpPath = Utils_ReplaceVars( "%miranda_userdata%" ); - int tPathLen = mir_snprintf( fileName, MAX_PATH, "%s\\Images\\Tlen", tmpPath ); + int tPathLen = mir_snprintf(fileName, MAX_PATH, "%s\\Images\\Tlen", tmpPath); long oldSize = 0, lSize = atol(size); DWORD dwAttributes = GetFileAttributesA( fileName ); if ( dwAttributes == 0xffffffff || ( dwAttributes & FILE_ATTRIBUTE_DIRECTORY ) == 0 ) @@ -284,7 +284,7 @@ BOOL SendPicture(TlenProtocol *proto, HANDLE hContact) { char idStr[10]; char fileBuffer[2048]; int id = JabberSerialNext(proto); - _snprintf(idStr, sizeof(idStr), "%d", id); + mir_snprintf(idStr, sizeof(idStr), "%d", id); item = JabberListAdd(proto, LIST_PICTURE, idStr); item->ft = TlenFileCreateFT(proto, jid); item->ft->files = (char **) mir_alloc(sizeof(char *)); -- cgit v1.2.3