diff options
| author | George Hazan <george.hazan@gmail.com> | 2013-02-23 20:01:17 +0000 | 
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2013-02-23 20:01:17 +0000 | 
| commit | 97d992fe41e7eaafba3e5700861b0e098a8f6080 (patch) | |
| tree | 48c4f577c59a9a52e0875771b00d66d301181de7 | |
| parent | aa387fa04aa096d163932d3f5f9711a2f146c6f0 (diff) | |
useless variable m_szProtoName removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@3740 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
| -rw-r--r-- | include/delphi/m_protoint.inc | 1 | ||||
| -rw-r--r-- | include/m_protoint.h | 1 | ||||
| -rw-r--r-- | protocols/AimOscar/src/proto.cpp | 6 | ||||
| -rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.cpp | 7 | ||||
| -rw-r--r-- | protocols/IRCG/src/ircproto.cpp | 2 | ||||
| -rw-r--r-- | protocols/IcqOscarJ/src/icq_proto.cpp | 18 | ||||
| -rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 6 | ||||
| -rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 5 | ||||
| -rw-r--r-- | protocols/Omegle/src/proto.cpp | 4 | ||||
| -rw-r--r-- | protocols/Tlen/src/jabber_opt.cpp | 2 | ||||
| -rw-r--r-- | protocols/Tlen/src/jabber_svc.cpp | 6 | ||||
| -rw-r--r-- | protocols/Tlen/src/jabber_thread.cpp | 4 | ||||
| -rw-r--r-- | protocols/Tlen/src/tlen.cpp | 6 | ||||
| -rw-r--r-- | protocols/Tlen/src/tlen_muc.cpp | 4 | ||||
| -rw-r--r-- | protocols/Twitter/src/proto.cpp | 10 | ||||
| -rw-r--r-- | src/modules/protocols/protoint.cpp | 2 | 
16 files changed, 25 insertions, 59 deletions
| diff --git a/include/delphi/m_protoint.inc b/include/delphi/m_protoint.inc index 0b41d5450b..58455d02b5 100644 --- a/include/delphi/m_protoint.inc +++ b/include/delphi/m_protoint.inc @@ -48,7 +48,6 @@ type      iVersion      :int;  // version 2 or higher designate support of Unicode services
      tszUserName   :TChar;
 -    szProtoName   :PAnsiChar;
      szModuleName  :PAnsiChar;
      hProtoIcon    :THandle;
 diff --git a/include/m_protoint.h b/include/m_protoint.h index a042a018e9..554a08194e 100644 --- a/include/m_protoint.h +++ b/include/m_protoint.h @@ -48,7 +48,6 @@ struct  PROTO_INTERFACE  	       m_iXStatus,
  	       m_iVersion;  // version 2 or higher designate support of Unicode services
  	TCHAR* m_tszUserName;
 -	char*  m_szProtoName;
  	char*  m_szModuleName;
  	HANDLE m_hProtoIcon;
 diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index cd36490c21..10d9a0a594 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -21,10 +21,7 @@ CAimProto::CAimProto(const char* aProtoName, const TCHAR* aUserName)  	: chat_rooms(5)
  {
  	ProtoConstructor(this, aProtoName, aUserName);
 -	m_szProtoName = mir_strdup(aProtoName);
 -	_strlwr(m_szProtoName);
 -	m_szProtoName[0] = (char)toupper(m_szProtoName[0]);
 -	LOG("Setting protocol/module name to '%s/%s'", m_szProtoName, m_szModuleName);
 +	LOG("Setting protocol/module name to '%s'", m_szModuleName);
  	//create some events
  	hAvatarEvent  = CreateEvent(NULL, TRUE, FALSE, NULL);
 @@ -113,7 +110,6 @@ CAimProto::~CAimProto()  	mir_free(ADMIN_COOKIE);
  	mir_free(username);
 -	mir_free(m_szProtoName);
  	ProtoDestructor(this);
  }
 diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 3dba2f5552..fb98f5153d 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -37,9 +37,6 @@ GGPROTO::GGPROTO(const char* pszProtoName, const TCHAR* tszUserName)  	InitializeCriticalSection(&avatar_mutex);
  	InitializeCriticalSection(&sessions_mutex);
 -	// Init instance names
 -	m_szProtoName = GGDEF_PROTONAME;
 -
  	// Register netlib user
  	TCHAR name[128];
  	mir_sntprintf(name, SIZEOF(name), TranslateT("%s connection"), m_tszUserName);
 @@ -690,11 +687,11 @@ void __cdecl GGPROTO::getawaymsgthread(void *hContact)  	gg_sleep(100, FALSE, "getawaymsgthread", 106, 1);
  	if (!db_get_s(hContact, "CList", GG_KEY_STATUSDESCR, &dbv, DBVT_TCHAR))
  	{
 -		ProtoBroadcastAck(m_szProtoName, hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM) dbv.ptszVal);
 +		ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM) dbv.ptszVal);
  		netlog("getawaymsgthread(): Reading away msg <" TCHAR_STR_PARAM ">.", dbv.ptszVal);
  		DBFreeVariant(&dbv);
  	} else {
 -		ProtoBroadcastAck(m_szProtoName, hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM) NULL);
 +		ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM) NULL);
  	}
  	netlog("getawaymsgthread(): end");
  }
 diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index f77bd5505d..0f8aa6e1bb 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -72,7 +72,7 @@ CIrcProto::CIrcProto(const char* szModuleName, const TCHAR* tszUserName) :  	InitPrefs();
  	char text[ MAX_PATH ];
 -	mir_snprintf( text, sizeof( text ), "%s/Status", m_szProtoName );
 +	mir_snprintf( text, sizeof( text ), "%s/Status", m_szModuleName);
  	CallService( MS_DB_SETSETTINGRESIDENT, TRUE, ( LPARAM )text );
  	CList_SetAllOffline(true);
 diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index cf2d9bf790..73ecda2a7c 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -71,17 +71,15 @@ static int CompareContactsCache(const icq_contacts_cache *p1, const icq_contacts  }
  CIcqProto::CIcqProto( const char* aProtoName, const TCHAR* aUserName ) :
 -cookies(10, CompareCookies),
 -directConns(10, CompareConns),
 -expectedFileRecvs(10, CompareFT),
 -contactsCache(10, CompareContactsCache),
 -cheekySearchId( -1 )
 +	cookies(10, CompareCookies),
 +	directConns(10, CompareConns),
 +	expectedFileRecvs(10, CompareFT),
 +	contactsCache(10, CompareContactsCache),
 +	cheekySearchId( -1 )
  {
  	ProtoConstructor(this, aProtoName, aUserName);
 -	m_szProtoName = mir_strdup(aProtoName);
 -	_strlwr( m_szProtoName );
 -	m_szProtoName[0] = toupper( m_szProtoName[0] );
 -	NetLog_Server( "Setting protocol/module name to '%s/%s'", m_szProtoName, m_szModuleName );
 +
 +	NetLog_Server( "Setting protocol/module name to '%s'", m_szModuleName );
  	oftMutex = new icq_critical_section();
 @@ -267,8 +265,6 @@ CIcqProto::~CIcqProto()  	SAFE_FREE(&m_modeMsgs.szFfc);
  	NetLog_Server("%s: Protocol instance '%s' destroyed.", ICQ_PROTOCOL_NAME, m_szModuleName);
 -
 -	mir_free( m_szProtoName );
  	ProtoDestructor(this);
  }
 diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 29e17f7444..7eeeb47a52 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -93,10 +93,7 @@ CJabberProto::CJabberProto(const char* aProtoName, const TCHAR *aUserName) :  	m_szXmlStreamToBeInitialized = NULL;
 -	m_szProtoName = mir_strdup(aProtoName);
 -	_strlwr(m_szProtoName);
 -	m_szProtoName[0] = toupper(m_szProtoName[0]);
 -	Log("Setting protocol/module name to '%s/%s'", m_szProtoName, m_szModuleName);
 +	Log("Setting protocol/module name to '%s'", m_szModuleName);
  	// Initialize Jabber API
  	m_JabberApi.m_psProto = this;
 @@ -245,7 +242,6 @@ CJabberProto::~CJabberProto()  	mir_free(m_transportProtoTableStartIndex);
  	mir_free(m_szStreamId);
 -	mir_free(m_szProtoName);
  	int i;
  	for (i=0; i < m_lstTransports.getCount(); i++)
 diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 6673bb554f..5b9872f84a 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -47,10 +47,6 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) :  	ProtoConstructor(this, aProtoName, aUserName);
 -	m_szProtoName = mir_strdup(aProtoName);
 -	_strlwr(m_szProtoName);
 -	m_szProtoName[0] = (char)toupper(m_szProtoName[0]);
 -
  	mir_snprintf(path, sizeof(path), "%s/Status", m_szModuleName);
  	CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
 @@ -186,7 +182,6 @@ CMsnProto::~CMsnProto()  	mir_free(mailsoundname);
  	mir_free(alertsoundname);
 -	mir_free(m_szProtoName);
  	for (int i=0; i < MSN_NUM_MODES; i++)
  		mir_free(msnModeMsgs[i]);
 diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp index 2a28589e61..2380eb48ec 100644 --- a/protocols/Omegle/src/proto.cpp +++ b/protocols/Omegle/src/proto.cpp @@ -24,8 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  OmegleProto::OmegleProto(const char* proto_name, const TCHAR* username)
  {
 -	ProtoConstructor(this, aProtoName, aUserName);
 -	m_szProtoName  = mir_strdup( proto_name );
 +	ProtoConstructor(this, proto_name, username);
  	this->facy.parent = this;
 @@ -81,7 +80,6 @@ OmegleProto::~OmegleProto( )  	mir_free( this->facy.nick_ );
 -	mir_free( m_szProtoName );
  	ProtoDestructor(this);
  }
 diff --git a/protocols/Tlen/src/jabber_opt.cpp b/protocols/Tlen/src/jabber_opt.cpp index 297ac34cae..6f71238db9 100644 --- a/protocols/Tlen/src/jabber_opt.cpp +++ b/protocols/Tlen/src/jabber_opt.cpp @@ -669,7 +669,7 @@ static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,  					} else {
  						delay=GetDlgItemInt(hwndDlg, IDC_DELAY, NULL, FALSE);
  					}
 -					_snprintf(title, sizeof(title), Translate("%s mail"), proto->m_szProtoName);
 +					_snprintf(title, sizeof(title), Translate("%s mail"), proto->m_szModuleName);
  					MailPopupPreview((DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORBKG,CPM_GETCOLOUR,0,0),
  									(DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORTXT,CPM_GETCOLOUR,0,0),
  									title,
 diff --git a/protocols/Tlen/src/jabber_svc.cpp b/protocols/Tlen/src/jabber_svc.cpp index b0a284c9e1..a064aeb591 100644 --- a/protocols/Tlen/src/jabber_svc.cpp +++ b/protocols/Tlen/src/jabber_svc.cpp @@ -60,7 +60,7 @@ DWORD_PTR __cdecl TlenProtocol::GetCaps(int type, HANDLE hContact)  INT_PTR TlenGetName(void *ptr, LPARAM wParam, LPARAM lParam)
  {
  	TlenProtocol *proto = (TlenProtocol *)ptr;
 -	strncpy((char *) lParam, proto->m_szProtoName, wParam);
 +	strncpy((char*)lParam, proto->m_szModuleName, wParam);
  	return 0;
  }
 @@ -1277,10 +1277,6 @@ TlenProtocol::TlenProtocol( const char* aProtoName, const TCHAR* aUserName )  {
  	ProtoConstructor(this, aProtoName, aUserName);
 -	m_szProtoName = mir_strdup(aProtoName);
 -	_strlwr( m_szProtoName );
 -	m_szProtoName[0] = toupper( m_szProtoName[0] );
 -
  	TlenInitServicesVTbl(this);
  	InitializeCriticalSection(&modeMsgMutex);
 diff --git a/protocols/Tlen/src/jabber_thread.cpp b/protocols/Tlen/src/jabber_thread.cpp index 6daf6ce0f3..36459ac744 100644 --- a/protocols/Tlen/src/jabber_thread.cpp +++ b/protocols/Tlen/src/jabber_thread.cpp @@ -983,7 +983,7 @@ static void TlenProcessW(XmlNode *node, ThreadData *info)  	if ((f=JabberXmlGetAttrValue(node, "f")) != NULL) {
  		char webContactName[128];
 -		sprintf(webContactName, Translate("%s Web Messages"), info->proto->m_szProtoName);
 +		sprintf(webContactName, Translate("%s Web Messages"), info->proto->m_szModuleName);
  		if ((hContact=JabberHContactFromJID(info->proto, webContactName)) == NULL) {
  			hContact = JabberDBCreateContact(info->proto, webContactName, webContactName, TRUE);
  		}
 @@ -1198,7 +1198,7 @@ static void TlenProcessN(XmlNode *node, ThreadData *info)  		str = NULL;
  		strSize = 0;
 -		JabberStringAppend(&str, &strSize, Translate("%s mail"), info->proto->m_szProtoName);
 +		JabberStringAppend(&str, &strSize, Translate("%s mail"), info->proto->m_szModuleName);
  		popupTitle = JabberTextDecode(str);
  		mir_free(str);
 diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index 523f4ea0f3..4b392137e0 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -295,11 +295,11 @@ int TlenOnModulesLoaded(void *ptr, WPARAM wParam, LPARAM lParam)  	}
  	TlenMUCInit(proto);
  	sprintf(str, "%s", LPGEN("Incoming mail"));
 -	SkinAddNewSoundEx("TlenMailNotify", proto->m_szProtoName, str);
 +	SkinAddNewSoundEx("TlenMailNotify", proto->m_szModuleName, str);
  	sprintf(str, "%s", LPGEN("Alert"));
 -	SkinAddNewSoundEx("TlenAlertNotify", proto->m_szProtoName, str);
 +	SkinAddNewSoundEx("TlenAlertNotify", proto->m_szModuleName, str);
  	sprintf(str, "%s", LPGEN("Voice chat"));
 -	SkinAddNewSoundEx("TlenVoiceNotify", proto->m_szProtoName, str);
 +	SkinAddNewSoundEx("TlenVoiceNotify", proto->m_szModuleName, str);
  	HookEventObj_Ex(ME_USERINFO_INITIALISE, proto, TlenUserInfoInit);
 diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp index 6990b7e9aa..d28c4ed37b 100644 --- a/protocols/Tlen/src/tlen_muc.cpp +++ b/protocols/Tlen/src/tlen_muc.cpp @@ -671,7 +671,7 @@ int TlenMUCCreateWindow(TlenProtocol *proto, const char *roomID, const char *roo  	mucw.cbSize = sizeof(MUCCWINDOW);
  	mucw.iType = MUCC_WINDOW_CHATROOM;
  	mucw.pszModule = proto->m_szModuleName;
 -	mucw.pszModuleName = proto->m_szProtoName;
 +	mucw.pszModuleName = proto->m_szModuleName;
  	mucw.pszID = roomID;
  	mucw.pszName = roomName;
  	mucw.pszNick = nick;
 @@ -1041,7 +1041,7 @@ INT_PTR TlenMUCMenuHandleChats(void *ptr, LPARAM wParam, LPARAM lParam)  	mucw.cbSize = sizeof(MUCCWINDOW);
  	mucw.iType = MUCC_WINDOW_CHATLIST;
  	mucw.pszModule = proto->m_szModuleName;
 -	mucw.pszModuleName = proto->m_szProtoName;
 +	mucw.pszModuleName = proto->m_szModuleName;
  	CallService(MS_MUCC_NEW_WINDOW, 0, (LPARAM) &mucw);
  	return 0;
  }
 diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 6f143ba501..11d1073dc4 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -32,9 +32,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  TwitterProto::TwitterProto(const char *proto_name,const TCHAR *username)
  {
 -	m_szProtoName  = mir_strdup (proto_name);
 -	m_szModuleName = mir_strdup (proto_name);
 -	m_tszUserName  = mir_tstrdup(username);
 +	ProtoConstructor(this, proto_name, username);
  	CreateProtoService(m_szModuleName,PS_CREATEACCMGRUI, &TwitterProto::SvcCreateAccMgrUI,this);
  	CreateProtoService(m_szModuleName,PS_GETNAME,  &TwitterProto::GetName,    this);
 @@ -95,9 +93,7 @@ TwitterProto::~TwitterProto()  	CloseHandle(avatar_lock_);
  	CloseHandle(signon_lock_);
 -	mir_free(m_szProtoName);
 -	mir_free(m_szModuleName);
 -	mir_free(m_tszUserName);
 +	ProtoDestructor(this);
  }
  // *************************
 @@ -247,7 +243,7 @@ int TwitterProto::SvcCreateAccMgrUI(WPARAM wParam,LPARAM lParam)  int TwitterProto::GetName(WPARAM wParam,LPARAM lParam)
  {
 -	lstrcpynA(reinterpret_cast<char*>(lParam), m_szProtoName, (int)wParam);
 +	lstrcpynA(reinterpret_cast<char*>(lParam), m_szModuleName, (int)wParam);
  	return 0;
  }
 diff --git a/src/modules/protocols/protoint.cpp b/src/modules/protocols/protoint.cpp index c0086cded0..1c80a97565 100644 --- a/src/modules/protocols/protoint.cpp +++ b/src/modules/protocols/protoint.cpp @@ -289,7 +289,6 @@ PROTO_INTERFACE* AddDefaultAccount(const char* szProtoName)  	PROTO_INTERFACE* ppi = new DEFAULT_PROTO_INTERFACE;
  	if (ppi != NULL) {
  		ppi->m_szModuleName = mir_strdup(szProtoName);
 -		ppi->m_szProtoName = mir_strdup(szProtoName);
  		ppi->m_tszUserName = mir_a2t(szProtoName);
  	}
  	return ppi;
 @@ -298,7 +297,6 @@ PROTO_INTERFACE* AddDefaultAccount(const char* szProtoName)  int FreeDefaultAccount(PROTO_INTERFACE* ppi)
  {
  	mir_free(ppi->m_szModuleName);
 -	mir_free(ppi->m_szProtoName);
  	mir_free(ppi->m_tszUserName);
  	delete ppi;
  	return 0;
 | 
