From acd4daf132c8ff3b05df7615e95f60be2fb82ddb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 1 Jun 2015 20:40:05 +0000 Subject: various quirks with PROTO_AVATAR_INFORMATION declarations git-svn-id: http://svn.miranda-ng.org/main/trunk@13965 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Weather/src/weather_svcs.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'plugins/Weather') diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp index c72ebf15bd..c5ce992c7e 100644 --- a/plugins/Weather/src/weather_svcs.cpp +++ b/plugins/Weather/src/weather_svcs.cpp @@ -131,7 +131,7 @@ INT_PTR WeatherGetAvatarInfo(WPARAM wParam, LPARAM lParam) TCHAR szSearchPath[MAX_PATH], *chop; WORD status; unsigned i; - PROTO_AVATAR_INFORMATION* ai = ( PROTO_AVATAR_INFORMATION* )lParam; + PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION*)lParam; GetModuleFileName(GetModuleHandle(NULL), szSearchPath, SIZEOF(szSearchPath)); chop = _tcsrchr(szSearchPath, '\\'); @@ -139,7 +139,7 @@ INT_PTR WeatherGetAvatarInfo(WPARAM wParam, LPARAM lParam) if (chop) *chop = '\0'; else szSearchPath[0] = 0; - status = (WORD)db_get_w(ai->hContact, WEATHERPROTONAME, "StatusIcon",0); + status = (WORD)db_get_w(pai->hContact, WEATHERPROTONAME, "StatusIcon",0); for (i=0; i<10; i++) if (statusValue[i] == status) break; @@ -147,29 +147,29 @@ INT_PTR WeatherGetAvatarInfo(WPARAM wParam, LPARAM lParam) if (i >= 10) return GAIR_NOAVATAR; - ai->format = PA_FORMAT_PNG; - mir_sntprintf(ai->filename, SIZEOF(ai->filename), _T("%s\\Plugins\\Weather\\%s.png"), szSearchPath, statusStr[i]); - if ( _taccess(ai->filename, 4) == 0) + pai->format = PA_FORMAT_PNG; + mir_sntprintf(pai->filename, SIZEOF(pai->filename), _T("%s\\Plugins\\Weather\\%s.png"), szSearchPath, statusStr[i]); + if ( _taccess(pai->filename, 4) == 0) return GAIR_SUCCESS; - ai->format = PA_FORMAT_GIF; - mir_sntprintf(ai->filename, SIZEOF(ai->filename), _T("%s\\Plugins\\Weather\\%s.gif"), szSearchPath, statusStr[i]); - if ( _taccess(ai->filename, 4) == 0) + pai->format = PA_FORMAT_GIF; + mir_sntprintf(pai->filename, SIZEOF(pai->filename), _T("%s\\Plugins\\Weather\\%s.gif"), szSearchPath, statusStr[i]); + if ( _taccess(pai->filename, 4) == 0) return GAIR_SUCCESS; - ai->format = PA_FORMAT_UNKNOWN; - ai->filename[0] = 0; + pai->format = PA_FORMAT_UNKNOWN; + pai->filename[0] = 0; return GAIR_NOAVATAR; } void AvatarDownloaded(MCONTACT hContact) { - PROTO_AVATAR_INFORMATION AI = {0}; - AI.hContact = hContact; + PROTO_AVATAR_INFORMATION ai = { 0 }; + ai.hContact = hContact; - if (WeatherGetAvatarInfo(GAIF_FORCE, (LPARAM)&AI) == GAIR_SUCCESS) - ProtoBroadcastAck(WEATHERPROTONAME, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &AI, 0); + if (WeatherGetAvatarInfo(GAIF_FORCE, (LPARAM)&ai) == GAIR_SUCCESS) + ProtoBroadcastAck(WEATHERPROTONAME, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &ai, 0); else ProtoBroadcastAck(WEATHERPROTONAME, hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0); } -- cgit v1.2.3