diff options
-rw-r--r-- | plugins/AssocMgr/src/assoclist.cpp | 101 | ||||
-rw-r--r-- | plugins/AssocMgr/src/dde.cpp | 41 | ||||
-rw-r--r-- | plugins/AssocMgr/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/AssocMgr/src/reg.cpp | 35 | ||||
-rw-r--r-- | plugins/AssocMgr/src/test.cpp | 3 | ||||
-rw-r--r-- | plugins/AutoRun/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/BasicHistory/src/ExportManager.cpp | 2 | ||||
-rw-r--r-- | plugins/BasicHistory/src/Options.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_rowtemplateopt.cpp | 4 | ||||
-rw-r--r-- | plugins/CmdLine/MimCmd/src/commands.cpp | 6 | ||||
-rw-r--r-- | plugins/CmdLine/src/hooked_events.cpp | 6 | ||||
-rw-r--r-- | plugins/CmdLine/src/mimcmd_handlers.cpp | 41 | ||||
-rw-r--r-- | plugins/LangMan/src/options.cpp | 26 | ||||
-rw-r--r-- | plugins/Weather/src/weather.h | 2 | ||||
-rw-r--r-- | src/modules/clist/clistmenus.cpp | 4 |
15 files changed, 116 insertions, 165 deletions
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp index 38810f1675..a1dce06bdf 100644 --- a/plugins/AssocMgr/src/assoclist.cpp +++ b/plugins/AssocMgr/src/assoclist.cpp @@ -171,10 +171,8 @@ void CleanupMimeTypeAddedSettings(void) static UINT nNotifyTimerID; /* protected by csNotifyTimer */
static CRITICAL_SECTION csNotifyTimer;
-static void CALLBACK NotifyTimerProc(HWND hwnd, UINT msg, UINT_PTR nTimerID, DWORD dwTime)
+static void CALLBACK NotifyTimerProc(HWND hwnd, UINT, UINT_PTR nTimerID, DWORD)
{
- UNREFERENCED_PARAMETER(msg);
- UNREFERENCED_PARAMETER(dwTime);
EnterCriticalSection(&csNotifyTimer);
KillTimer(hwnd, nTimerID);
if(nNotifyTimerID == nTimerID) /* might be stopped previously */
@@ -272,8 +270,10 @@ static int ReplaceImageListAssocIcon(HIMAGELIST himl, const ASSOCDATA *assoc, in static TCHAR* GetAssocTypeDesc(const ASSOCDATA *assoc)
{
static TCHAR szDesc[32];
- if(assoc->pszFileExt == NULL) mir_sntprintf(szDesc, SIZEOF(szDesc), TranslateT("%hs:"), assoc->pszClassName);
- else mir_sntprintf(szDesc, SIZEOF(szDesc), TranslateT("%hs files"), assoc->pszFileExt);
+ if(assoc->pszFileExt == NULL)
+ mir_sntprintf(szDesc, SIZEOF(szDesc), _T("%hs:"), assoc->pszClassName);
+ else
+ mir_sntprintf(szDesc, SIZEOF(szDesc), TranslateT("%hs files"), assoc->pszFileExt);
return szDesc;
}
@@ -281,13 +281,12 @@ static TCHAR* GetAssocTypeDesc(const ASSOCDATA *assoc) static BOOL IsAssocRegistered(const ASSOCDATA *assoc)
{
BOOL fSuccess = FALSE, fIsUrl, fUseMainCmdLine;
- TCHAR *pszRunCmd;
fIsUrl = (assoc->pszFileExt == NULL);
fUseMainCmdLine = (assoc->pszService == NULL);
/* class */
- pszRunCmd = MakeRunCommand(fUseMainCmdLine, !fUseMainCmdLine);
+ TCHAR *pszRunCmd = MakeRunCommand(fUseMainCmdLine, !fUseMainCmdLine);
if(pszRunCmd!= NULL)
fSuccess = IsRegClass(assoc->pszClassName, pszRunCmd);
mir_free(pszRunCmd); /* does NULL check */
@@ -348,13 +347,13 @@ static BOOL EnsureAssocRegistered(const ASSOCDATA *assoc) static BOOL UnregisterAssoc(const ASSOCDATA *assoc)
{
BOOL fIsUrl, fUseMainCmdLine;
- TCHAR *pszAppFileName, *pszRunCmd;
+ TCHAR *pszAppFileName;
fIsUrl = (assoc->pszFileExt == NULL);
fUseMainCmdLine = (assoc->pszService == NULL);
/* class might have been registered by another instance */
- pszRunCmd = MakeRunCommand(fUseMainCmdLine, !fUseMainCmdLine);
+ TCHAR *pszRunCmd = MakeRunCommand(fUseMainCmdLine, !fUseMainCmdLine);
if(pszRunCmd!= NULL && !IsRegClass(assoc->pszClassName, pszRunCmd)) {
mir_free(pszRunCmd);
return TRUE; /* succeed anyway */
@@ -399,11 +398,10 @@ typedef struct { static BOOL AddNewAssocItem_Worker(char *pszClassName, const TYPEDESCHEAD *tdh, char *pszFileExt, TCHAR *pszVerbDesc, char *pszMimeType)
{
ASSOCDATA *pAssocListBuf, *assoc;
- int index;
/* is already in list? */
EnterCriticalSection(&csAssocList);
- index = FindAssocItem(pszClassName);
+ int index = FindAssocItem(pszClassName);
if(index!= -1) return FALSE;
/* resize storage array */
@@ -447,11 +445,10 @@ static BOOL AddNewAssocItem_Worker(char *pszClassName, const TYPEDESCHEAD *tdh, static BOOL RemoveAssocItem_Worker(const char *pszClassName)
{
ASSOCDATA *pAssocListBuf, *assoc;
- int index;
/* find index */
EnterCriticalSection(&csAssocList);
- index = FindAssocItem(pszClassName);
+ int index = FindAssocItem(pszClassName);
if(index == -1) {
LeaveCriticalSection(&csAssocList);
return FALSE;
@@ -509,13 +506,10 @@ static INT_PTR ServiceAddNewFileType(WPARAM, LPARAM lParam) return 3;
}
-static INT_PTR ServiceRemoveFileType(WPARAM wParam, LPARAM lParam)
+static INT_PTR ServiceRemoveFileType(WPARAM, LPARAM lParam)
{
- char *pszClassName;
- UNREFERENCED_PARAMETER(wParam);
-
if ((char*)lParam == NULL) return 2;
- pszClassName = MakeFileClassName((char*)lParam);
+ char *pszClassName = MakeFileClassName((char*)lParam);
if(pszClassName!= NULL)
if(RemoveAssocItem_Worker(pszClassName)) {
mir_free(pszClassName);
@@ -525,11 +519,9 @@ static INT_PTR ServiceRemoveFileType(WPARAM wParam, LPARAM lParam) return 3;
}
-static INT_PTR ServiceAddNewUrlType(WPARAM wParam, LPARAM lParam)
+static INT_PTR ServiceAddNewUrlType(WPARAM, LPARAM lParam)
{
const URLTYPEDESC *utd = (URLTYPEDESC*)lParam;
- char *pszClassName;
- UNREFERENCED_PARAMETER(wParam);
if(utd->cbSize < sizeof(URLTYPEDESC))
return 1;
@@ -538,7 +530,7 @@ static INT_PTR ServiceAddNewUrlType(WPARAM wParam, LPARAM lParam) if(utd->pszProtoPrefix == NULL || utd->pszProtoPrefix[lstrlenA(utd->pszProtoPrefix)-1]!= ':')
return 2;
- pszClassName = MakeUrlClassName(utd->pszProtoPrefix);
+ char *pszClassName = MakeUrlClassName(utd->pszProtoPrefix);
if(pszClassName!= NULL)
if(AddNewAssocItem_Worker(pszClassName, (TYPEDESCHEAD*)utd, NULL, NULL, NULL))
/* no need to free pszClassName, as its
@@ -548,13 +540,10 @@ static INT_PTR ServiceAddNewUrlType(WPARAM wParam, LPARAM lParam) return 3;
}
-static INT_PTR ServiceRemoveUrlType(WPARAM wParam, LPARAM lParam)
+static INT_PTR ServiceRemoveUrlType(WPARAM, LPARAM lParam)
{
- char *pszClassName;
- UNREFERENCED_PARAMETER(wParam);
-
if ((char*)lParam == NULL) return 2;
- pszClassName = MakeUrlClassName((char*)lParam);
+ char *pszClassName = MakeUrlClassName((char*)lParam);
if(pszClassName!= NULL)
if(RemoveAssocItem_Worker(pszClassName)) {
mir_free(pszClassName);
@@ -570,17 +559,15 @@ static BOOL InvokeHandler_Worker(const char *pszClassName, const TCHAR *pszParam {
void *pvParam;
char *pszService;
- int index;
- ASSOCDATA *assoc;
/* find it in list */
EnterCriticalSection(&csAssocList);
- index = FindAssocItem(pszClassName);
+ int index = FindAssocItem(pszClassName);
if(index == -1) {
LeaveCriticalSection(&csAssocList);
return FALSE;
}
- assoc = &pAssocList[index];
+ ASSOCDATA *assoc = &pAssocList[index];
/* no service specified? correct registry to use main commandline */
if(assoc->pszService == NULL) {
EnsureAssocRegistered(assoc);
@@ -606,11 +593,10 @@ static BOOL InvokeHandler_Worker(const char *pszClassName, const TCHAR *pszParam INT_PTR InvokeFileHandler(const TCHAR *pszFileName)
{
char *pszClassName, *pszFileExt;
- TCHAR *p;
INT_PTR res = CALLSERVICE_NOTFOUND;
/* find extension */
- p = (TCHAR*)_tcsrchr(pszFileName, _T('.'));
+ TCHAR *p = (TCHAR*)_tcsrchr(pszFileName, _T('.'));
if(p!= NULL) {
pszFileExt = t2a(p);
if(pszFileExt!= NULL) {
@@ -675,14 +661,14 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara {
switch(msg) {
case WM_INITDIALOG:
- { HWND hwndList;
+ {
HIMAGELIST himl;
LVITEM lvi;
ASSOCDATA *assoc;
int i;
TranslateDialogDefault(hwndDlg);
CoInitialize(NULL);
- hwndList = GetDlgItem(hwndDlg, IDC_ASSOCLIST);
+ HWND hwndList = GetDlgItem(hwndDlg, IDC_ASSOCLIST);
ListView_SetUnicodeFormat(hwndList, TRUE);
@@ -778,12 +764,11 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara }
case WM_SETTINGCHANGE:
case M_REFRESH_ICONS:
- { LVITEM lvi;
- HIMAGELIST himl;
+ {
+ LVITEM lvi;
ASSOCDATA *assoc;
- HWND hwndList;
- hwndList = GetDlgItem(hwndDlg, IDC_ASSOCLIST);
- himl = ListView_GetImageList(hwndList, LVSIL_SMALL);
+ HWND hwndList = GetDlgItem(hwndDlg, IDC_ASSOCLIST);
+ HIMAGELIST himl = ListView_GetImageList(hwndList, LVSIL_SMALL);
/* enum items */
lvi.iSubItem = 0;
lvi.mask = LVIF_PARAM|LVIF_IMAGE;
@@ -826,12 +811,14 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara return TRUE;
case WM_NOTIFY:
- { NMHDR *nmhdr = (NMHDR*)lParam;
+ {
+ NMHDR *nmhdr = (NMHDR*)lParam;
switch(nmhdr->idFrom) {
case IDC_ASSOCLIST:
switch(nmhdr->code) {
case LVN_DELETEITEM: /* also called on WM_DESTROY */
- { LVITEM lvi;
+ {
+ LVITEM lvi;
lvi.mask = LVIF_PARAM;
lvi.iSubItem = 0;
lvi.iItem = ((NMLISTVIEW*)lParam)->iItem;
@@ -852,7 +839,8 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara * bug should not be present using WinVista and higher */
switch(((NMLVKEYDOWN*)lParam)->wVKey) {
case VK_UP:
- { LVITEM lvi;
+ {
+ LVITEM lvi;
lvi.iSubItem = 0;
lvi.mask = LVIF_PARAM;
lvi.iItem = ListView_GetNextItem(nmhdr->hwndFrom, -1, LVNI_FOCUSED);
@@ -868,7 +856,8 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara break;
}
case VK_PRIOR:
- { LVITEM lvi;
+ {
+ LVITEM lvi;
lvi.iSubItem = 0;
lvi.mask = LVIF_PARAM;
lvi.iItem = ListView_GetNextItem(nmhdr->hwndFrom, -1, LVNI_FOCUSED);
@@ -891,7 +880,7 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara case 0:
switch(nmhdr->code) {
case PSN_APPLY:
- { HWND hwndList;
+ {
LVITEM lvi;
BOOL fEnabled, fRegFailed = FALSE;
ASSOCDATA *assoc;
@@ -900,7 +889,7 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara db_set_b(NULL, "AssocMgr", "OnlyWhileRunning", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_ONLYWHILERUNNING)!= 0));
/* save enabled assoc items */
- hwndList = GetDlgItem(hwndDlg, IDC_ASSOCLIST);
+ HWND hwndList = GetDlgItem(hwndDlg, IDC_ASSOCLIST);
lvi.iSubItem = 0;
lvi.mask = LVIF_PARAM;
EnterCriticalSection(&csAssocList);
@@ -912,8 +901,7 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara /* re-register registery keys */
if(fEnabled?!EnsureAssocRegistered(assoc):!UnregisterAssoc(assoc)) {
- char *pszErr;
- pszErr = GetWinErrorDescription(GetLastError());
+ char *pszErr = GetWinErrorDescription(GetLastError());
ShowInfoMessage(NIIF_ERROR, Translate("File association error"), Translate("There was an error writing to the registry to modify the file/url associations.\nReason: %s"), (pszErr!= NULL)?pszErr:Translate("Unknown"));
mir_free(pszErr); /* does NULL check */
fRegFailed = TRUE; /* just show one time */
@@ -922,11 +910,9 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara LeaveCriticalSection(&csAssocList);
NotifyAssocChange(TRUE);
PostMessage(hwndDlg, M_REFRESH_ICONS, 0, 0);
- if(fRegFailed) {
- }
/* autostart */
- { TCHAR *pszRunCmd;
- pszRunCmd = MakeRunCommand(TRUE, TRUE);
+ {
+ TCHAR *pszRunCmd = MakeRunCommand(TRUE, TRUE);
fRegFailed = FALSE;
if(pszRunCmd!= NULL) {
fEnabled = IsDlgButtonChecked(hwndDlg, IDC_AUTOSTART);
@@ -951,7 +937,7 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara return FALSE;
}
-static int AssocListOptInit(WPARAM wParam, LPARAM lParam)
+static int AssocListOptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = hInst;
@@ -992,7 +978,8 @@ void InitAssocList(void) InitializeCriticalSection(&csNotifyTimer);
/* register open-with app */
- { TCHAR *pszAppFileName, *pszIconLoc, *pszRunCmd;
+ {
+ TCHAR *pszAppFileName, *pszIconLoc, *pszRunCmd;
pszIconLoc = MakeIconLocation(NULL, 0);
// miranda32.exe
@@ -1014,7 +1001,8 @@ void InitAssocList(void) }
/* default items */
- { FILETYPEDESC ftd;
+ {
+ FILETYPEDESC ftd;
ftd.cbSize = sizeof(FILETYPEDESC);
ftd.pszFileExt = ".dat";
ftd.pszMimeType = NULL;
@@ -1032,7 +1020,6 @@ void UninitAssocList(void) {
BYTE fOnlyWhileRunning;
ASSOCDATA *assoc;
- int i;
/* Options */
UnhookEvent(hHookOptInit);
@@ -1045,7 +1032,7 @@ void UninitAssocList(void) /* Assoc List */
fOnlyWhileRunning = db_get_b(NULL, "AssocMgr", "OnlyWhileRunning", SETTING_ONLYWHILERUNNING_DEFAULT);
- for(i = 0;i<nAssocListCount;++i) {
+ for(int i = 0;i<nAssocListCount;++i) {
assoc = &pAssocList[i];
/* remove registry keys */
diff --git a/plugins/AssocMgr/src/dde.cpp b/plugins/AssocMgr/src/dde.cpp index c187630910..71e719e760 100644 --- a/plugins/AssocMgr/src/dde.cpp +++ b/plugins/AssocMgr/src/dde.cpp @@ -89,9 +89,9 @@ static LRESULT CALLBACK DdeMessageWindow(HWND hwnd,UINT msg,WPARAM wParam,LPARAM {
switch(msg) {
case WM_DDE_INITIATE:
- { ATOM hSzApp,hSzTopic;
- hSzApp=LOWORD(lParam); /* no UnpackDDElParam() here */
- hSzTopic=HIWORD(lParam);
+ {
+ ATOM hSzApp=LOWORD(lParam); /* no UnpackDDElParam() here */
+ ATOM hSzTopic=HIWORD(lParam);
if ((hSzApp==GlobalFindAtom(DDEAPP) && hSzTopic==GlobalFindAtom(DDETOPIC)) || !hSzApp) {
hSzApp=GlobalAddAtom(DDEAPP);
hSzTopic=GlobalAddAtom(DDETOPIC);
@@ -104,15 +104,14 @@ static LRESULT CALLBACK DdeMessageWindow(HWND hwnd,UINT msg,WPARAM wParam,LPARAM return 0;
}
case WM_DDE_EXECUTE: /* posted message */
- { HGLOBAL hCommand;
+ {
+ HGLOBAL hCommand;
TCHAR *pszCommand;
DDEACK ack;
ZeroMemory(&ack,sizeof(ack));
if(UnpackDDElParam(msg,lParam,NULL,(PUINT_PTR)&hCommand)) {
-
/* ANSI execute command can't happen for shell */
if(IsWindowUnicode((HWND)wParam)) {
-
pszCommand = (TCHAR*)GlobalLock(hCommand);
if(pszCommand!=NULL) {
TCHAR *pszAction,*pszArg;
@@ -147,7 +146,8 @@ static LRESULT CALLBACK DdeMessageWindow(HWND hwnd,UINT msg,WPARAM wParam,LPARAM case WM_DDE_UNADVISE:
case WM_DDE_POKE:
/* fail safely for those to avoid memory leak in lParam */
- { ATOM hSzItem;
+ {
+ ATOM hSzItem;
DDEACK ack;
ZeroMemory(&ack,sizeof(ack));
if(UnpackDDElParam(msg,lParam,NULL,(PUINT_PTR)&hSzItem)) {
@@ -167,8 +167,6 @@ static LRESULT CALLBACK DdeMessageWindow(HWND hwnd,UINT msg,WPARAM wParam,LPARAM static HANDLE StartupMainProcess(TCHAR *pszDatabasePath)
{
TCHAR *p,szPath[MAX_PATH];
- PROCESS_INFORMATION pi;
- STARTUPINFO si;
/* we are inside RunDll32 here */
if (!GetModuleFileName(hInst,szPath,SIZEOF(szPath))) return NULL;
@@ -178,7 +176,9 @@ static HANDLE StartupMainProcess(TCHAR *pszDatabasePath) lstrcpy(++p,_T("miranda32.exe"));
/* inherit startup data from RunDll32 process */
+ STARTUPINFO si;
GetStartupInfo(&si);
+ PROCESS_INFORMATION pi;
if (!CreateProcess(szPath,pszDatabasePath,NULL,NULL,TRUE,GetPriorityClass(GetCurrentProcess()),NULL,NULL,&si,&pi))
return NULL;
CloseHandle(pi.hThread);
@@ -190,13 +190,10 @@ extern "C" { #endif
// entry point for RunDll32, this is also WaitForDDEW
-__declspec(dllexport) void CALLBACK WaitForDDE(HWND hwnd,HINSTANCE hinstExe,TCHAR *pszCmdLine,int nCmdShow)
+__declspec(dllexport) void CALLBACK WaitForDDE(HWND,HINSTANCE,TCHAR *pszCmdLine,int)
{
HANDLE pHandles[2];
DWORD dwTick;
- UNREFERENCED_PARAMETER(hinstExe);
- UNREFERENCED_PARAMETER(nCmdShow); /* obeys nCmdShow using GetStartupInfo() */
- UNREFERENCED_PARAMETER(hwnd);
/* wait for dde window to be available (avoiding race condition) */
pHandles[0]=CreateEvent(NULL,TRUE,FALSE,WNDCLASS_DDEMSGWINDOW);
@@ -224,24 +221,18 @@ __declspec(dllexport) void CALLBACK WaitForDDE(HWND hwnd,HINSTANCE hinstExe,TCHA /************************* Misc ***********************************/
-static int DdePreShutdown(WPARAM wParam,LPARAM lParam)
+static int DdePreShutdown(WPARAM,LPARAM)
{
- UNREFERENCED_PARAMETER(wParam);
- UNREFERENCED_PARAMETER(lParam);
/* dde needs to be stopped before any plugins are unloaded */
if(hwndDdeMsg!=NULL) DestroyWindow(hwndDdeMsg);
UnregisterClass(WNDCLASS_DDEMSGWINDOW,hInst);
return 0;
}
-static int DdeModulesLoaded2(WPARAM wParam,LPARAM lParam)
+static int DdeModulesLoaded2(WPARAM,LPARAM)
{
- WNDCLASS wcl;
- HANDLE hEvent;
- UNREFERENCED_PARAMETER(wParam);
- UNREFERENCED_PARAMETER(lParam);
-
/* create message window */
+ WNDCLASS wcl;
wcl.lpfnWndProc=DdeMessageWindow;
wcl.cbClsExtra=0;
wcl.cbWndExtra=0;
@@ -257,7 +248,7 @@ static int DdeModulesLoaded2(WPARAM wParam,LPARAM lParam) hwndDdeMsg=CreateWindow(WNDCLASS_DDEMSGWINDOW,NULL,0,0,0,0,0,NULL,NULL,hInst,NULL);
/* make known dde startup code is passed */
- hEvent=OpenEvent(EVENT_MODIFY_STATE,FALSE,WNDCLASS_DDEMSGWINDOW);
+ HANDLE hEvent=OpenEvent(EVENT_MODIFY_STATE,FALSE,WNDCLASS_DDEMSGWINDOW);
if(hEvent!=NULL) {
SetEvent(hEvent);
CloseHandle(hEvent);
@@ -269,10 +260,8 @@ static int DdeModulesLoaded2(WPARAM wParam,LPARAM lParam) return 0;
}
-static int DdeModulesLoaded(WPARAM wParam,LPARAM lParam)
+static int DdeModulesLoaded(WPARAM,LPARAM)
{
- UNREFERENCED_PARAMETER(wParam);
- UNREFERENCED_PARAMETER(lParam);
/* dde needs to be loaded after all the other plugins got loaded,
* hook again to get the latest position in chain */
UnhookEvent(hHookModulesLoaded);
diff --git a/plugins/AssocMgr/src/main.cpp b/plugins/AssocMgr/src/main.cpp index 58a65f5fbb..a40c0ecd34 100644 --- a/plugins/AssocMgr/src/main.cpp +++ b/plugins/AssocMgr/src/main.cpp @@ -76,10 +76,8 @@ static void InstallFile(const TCHAR *pszFileName,const TCHAR *pszDestSubDir) }
}
-static int AssocMgrModulesLoaded(WPARAM wParam,LPARAM lParam)
+static int AssocMgrModulesLoaded(WPARAM,LPARAM)
{
- UNREFERENCED_PARAMETER(wParam);
- UNREFERENCED_PARAMETER(lParam);
InitTest();
return 0;
}
diff --git a/plugins/AssocMgr/src/reg.cpp b/plugins/AssocMgr/src/reg.cpp index 9737094980..9fa97d0e61 100644 --- a/plugins/AssocMgr/src/reg.cpp +++ b/plugins/AssocMgr/src/reg.cpp @@ -251,8 +251,7 @@ static LONG DeleteRegSubTree(HKEY hKey,const TCHAR *pszSubKey) static LONG SetRegSubKeyStrDefValue(HKEY hMainKey,const TCHAR *pszSubKey,const TCHAR *pszVal)
{
HKEY hSubKey;
- LONG res;
- res=RegCreateKeyEx(hMainKey,pszSubKey,0,NULL,0,KEY_SET_VALUE|KEY_QUERY_VALUE,NULL,&hSubKey,NULL);
+ LONG res=RegCreateKeyEx(hMainKey,pszSubKey,0,NULL,0,KEY_SET_VALUE|KEY_QUERY_VALUE,NULL,&hSubKey,NULL);
if (!res) {
res=RegSetValueEx(hSubKey,NULL,0,REG_SZ,(BYTE*)pszVal,(lstrlen(pszVal)+1)*sizeof(TCHAR));
RegCloseKey(hSubKey);
@@ -263,10 +262,8 @@ static LONG SetRegSubKeyStrDefValue(HKEY hMainKey,const TCHAR *pszSubKey,const T // hKey must have been opened with KEY_SET_VALUE access right
static void SetRegStrPrefixValue(HKEY hKey,const TCHAR *pszValPrefix,const TCHAR *pszVal)
{
- TCHAR *pszStr;
- DWORD dwSize;
- dwSize=(lstrlen(pszVal)+lstrlen(pszValPrefix)+1)*sizeof(TCHAR);
- pszStr=(TCHAR*)mir_alloc(dwSize);
+ DWORD dwSize=(lstrlen(pszVal)+lstrlen(pszValPrefix)+1)*sizeof(TCHAR);
+ TCHAR *pszStr=(TCHAR*)mir_alloc(dwSize);
if (pszStr==NULL) return;
lstrcat(lstrcpy(pszStr,pszValPrefix),pszVal); /* buffer safe */
RegSetValueEx(hKey,NULL,0,REG_SZ,(BYTE*)pszStr,dwSize);
@@ -307,8 +304,7 @@ static TCHAR *GetRegStrValue(HKEY hKey,const TCHAR *pszValName) static BOOL IsRegStrValue(HKEY hKey,const TCHAR *pszValName,const TCHAR *pszCmpVal)
{
BOOL fSame=FALSE;
- TCHAR *pszVal;
- pszVal=GetRegStrValue(hKey,pszValName);
+ TCHAR *pszVal=GetRegStrValue(hKey,pszValName);
if (pszVal!=NULL) {
fSame=!lstrcmp(pszVal,pszCmpVal);
mir_free(pszVal);
@@ -320,9 +316,8 @@ static BOOL IsRegStrValue(HKEY hKey,const TCHAR *pszValName,const TCHAR *pszCmpV static BOOL IsRegStrValueA(HKEY hKey,const TCHAR *pszValName,const char *pszCmpVal)
{
BOOL fSame=FALSE;
- TCHAR *pszVal;
char *pszValA;
- pszVal=GetRegStrValue(hKey,pszValName);
+ TCHAR *pszVal=GetRegStrValue(hKey,pszValName);
if (pszVal!=NULL) {
pszValA=t2a(pszVal);
if (pszValA!=NULL)
@@ -457,22 +452,21 @@ static void BackupRegTree(HKEY hKey,const char *pszSubKey,const char *pszDbPrefi static LONG RestoreRegTree(HKEY hKey,const char *pszSubKey,const char *pszDbPrefix)
{
- char **ppszSettings,*pszSuffix,*pszPrefixWithSubKey;
- int nSettingsCount,i,nDbPrefixLen,nPrefixWithSubKeyLen;
+ char **ppszSettings,*pszSuffix;
+ int nSettingsCount,i;
char *pslash=NULL,*pnext,*pkeys;
char *pszValName;
WCHAR *pwszValName;
HKEY hSubKey;
DWORD dwType,cbData;
BYTE *pData;
- LONG res;
- nDbPrefixLen=lstrlenA(pszDbPrefix);
- nPrefixWithSubKeyLen=nDbPrefixLen+lstrlenA(pszSubKey)+1;
- pszPrefixWithSubKey=(char*)mir_alloc(nPrefixWithSubKeyLen+1);
+ int nDbPrefixLen=lstrlenA(pszDbPrefix);
+ int nPrefixWithSubKeyLen=nDbPrefixLen+lstrlenA(pszSubKey)+1;
+ char *pszPrefixWithSubKey=(char*)mir_alloc(nPrefixWithSubKeyLen+1);
if (pszPrefixWithSubKey==NULL) return ERROR_OUTOFMEMORY;
lstrcatA(lstrcatA(lstrcpyA(pszPrefixWithSubKey,pszDbPrefix),pszSubKey),"\\"); /* buffer safe */
- res=ERROR_NO_MORE_ITEMS;
+ LONG res=ERROR_NO_MORE_ITEMS;
if (pszPrefixWithSubKey!=NULL) {
if (EnumDbPrefixSettings("AssocMgr",pszPrefixWithSubKey,&ppszSettings,&nSettingsCount)) {
for(i=0;i<nSettingsCount;++i) {
@@ -515,10 +509,10 @@ static LONG RestoreRegTree(HKEY hKey,const char *pszSubKey,const char *pszDbPref static void DeleteRegTreeBackup(const char *pszSubKey,const char *pszDbPrefix)
{
- char **ppszSettings,*pszPrefixWithSubKey;
+ char **ppszSettings;
int nSettingsCount,i;
- pszPrefixWithSubKey=(char*)mir_alloc(lstrlenA(pszDbPrefix)+lstrlenA(pszSubKey)+2);
+ char *pszPrefixWithSubKey=(char*)mir_alloc(lstrlenA(pszDbPrefix)+lstrlenA(pszSubKey)+2);
if (pszPrefixWithSubKey==NULL) return;
lstrcatA(lstrcatA(lstrcpyA(pszPrefixWithSubKey,pszDbPrefix),pszSubKey),"\\"); /* buffer safe */
if (pszPrefixWithSubKey!=NULL) {
@@ -914,13 +908,12 @@ BOOL AddRegFileExt(const char *pszFileExt,const char *pszClassName,const char *p /* file ext */
if (!RegCreateKeyExA(hRootKey,pszFileExt,0,NULL,0,KEY_SET_VALUE|KEY_QUERY_VALUE|KEY_CREATE_SUB_KEY,NULL,&hExtKey,NULL)) {
- TCHAR *pszPrevClass;
/* backup previous app */
BackupRegTree(hRootKey,pszFileExt,"bak_");
/* remove any no-open flag */
RegDeleteValue(hExtKey,_T("NoOpen"));
/* open with progids */
- pszPrevClass=GetRegStrValue(hExtKey,NULL);
+ TCHAR *pszPrevClass=GetRegStrValue(hExtKey,NULL);
if (pszPrevClass!=NULL && !IsRegStrValueA(hExtKey,NULL,pszClassName))
if (!RegCreateKeyEx(hExtKey,_T("OpenWithProgids"),0,NULL,0,KEY_SET_VALUE,NULL,&hOpenWithKey,NULL)) {
/* previous class (backup) */
diff --git a/plugins/AssocMgr/src/test.cpp b/plugins/AssocMgr/src/test.cpp index 924e215c11..f4b20c277c 100644 --- a/plugins/AssocMgr/src/test.cpp +++ b/plugins/AssocMgr/src/test.cpp @@ -83,10 +83,9 @@ static __inline void aim_gchat_joinrequest(const char *room, int exchange) { roo static HANDLE hHookModulesLoaded;
static HANDLE hServiceParseLink;
-static int ServiceParseAimLink(WPARAM wParam,LPARAM lParam)
+static int ServiceParseAimLink(WPARAM,LPARAM lParam)
{
char *arg=(char*)lParam;
- UNREFERENCED_PARAMETER(wParam);
if(arg==NULL) return 1; /* sanity check */
/* skip leading prefix */
arg=strchr(arg,':');
diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp index c4dc84640d..1db8bfd406 100644 --- a/plugins/AutoRun/src/main.cpp +++ b/plugins/AutoRun/src/main.cpp @@ -100,7 +100,7 @@ static INT_PTR CALLBACK DlgProcAutorunOpts(HWND hwndDlg, UINT msg, WPARAM wParam return FALSE;
}
-static int AutorunOptInitialise(WPARAM wParam,LPARAM lParam)
+static int AutorunOptInitialise(WPARAM wParam,LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.position = 100100000;
@@ -109,7 +109,7 @@ static int AutorunOptInitialise(WPARAM wParam,LPARAM lParam) odp.pszTitle = ModuleName;
odp.pszGroup = LPGEN("Services");
odp.pfnDlgProc = DlgProcAutorunOpts;
- odp.flags = ODPF_BOLDGROUPS;
+ odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
return 0;
}
diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp index bbe33581a0..0143aeed2d 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -42,7 +42,7 @@ std::wstring GetFile(const TCHAR* ext, HWND hwnd, bool open) extUpper[0] = std::toupper(ext[0], loc);
mir_sntprintf(filter, SIZEOF(filter), TranslateT("%s Files (*.%s)"), extUpper, ext);
size_t len = _tcslen(filter) + 1;
- mir_sntprintf(filter + len, 512 - len, TranslateT("*.%s"), ext);
+ mir_sntprintf(filter + len, 512 - len, _T("*.%s"), ext);
len += _tcslen(filter + len);
filter[++len] = 0;
TCHAR stzFilePath[1024];
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index 9c712ad8c1..25464b0f1f 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -118,7 +118,7 @@ Options::~Options() {
}
-int Options::InitOptions(WPARAM wParam, LPARAM lParam)
+int Options::InitOptions(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.position = 100000000;
diff --git a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp index 77e822d815..5d5f3740ad 100644 --- a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp +++ b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp @@ -317,12 +317,12 @@ void RefreshTree(HWND hwndDlg,HTREEITEM hti) if (cell->type == 0)
mir_sntprintf(buf, SIZEOF(buf), TranslateT("Empty %s cell"), cell->cont == TC_COL?TranslateT("column"):TranslateT("line"));
else
- mir_sntprintf(buf, SIZEOF(buf), TranslateT("%s"), TranslateTS(types[cell->type]));
+ mir_sntprintf(buf, SIZEOF(buf), _T("%s"), TranslateTS(types[cell->type]));
}
else
{
if (cell->type == 0)
- mir_sntprintf(buf, SIZEOF(buf), TranslateT("%s"), cell->cont != TC_COL?TranslateT("columns"):TranslateT("lines"));
+ mir_sntprintf(buf, SIZEOF(buf), _T("%s"), cell->cont != TC_COL?TranslateT("columns"):TranslateT("lines"));
else
mir_sntprintf(buf, SIZEOF(buf), TranslateT("%s, contain %s"), TranslateTS(types[cell->type]),cell->cont != TC_COL?TranslateT("columns"):TranslateT("lines"));
}
diff --git a/plugins/CmdLine/MimCmd/src/commands.cpp b/plugins/CmdLine/MimCmd/src/commands.cpp index f562e8948b..eba3893763 100644 --- a/plugins/CmdLine/MimCmd/src/commands.cpp +++ b/plugins/CmdLine/MimCmd/src/commands.cpp @@ -139,8 +139,7 @@ void HandleHelpCommand(PCommand helpCommand, char *argv[], int argc, PReply repl reply->code = MIMRES_SUCCESS;
STRNCPY(reply->message, Translate("Available commands: "), size);
- int i;
- for (i = 0; i < cKnownCommands - 1; i++)
+ for (int i = 0; i < cKnownCommands - 1; i++)
{
strncat(reply->message, knownCommands[i].command, size);
strncat(reply->message, ", ", size);
@@ -173,8 +172,7 @@ PReply ParseCommand(char *argv[], int argc) void FillSharedDataStruct(PCommand command, char *arguments[], int count)
{
- int i;
- for (i = 0; i < count; i++)
+ for (int i = 0; i < count; i++)
{
STRNCPY(sdCmdLine->arguments[i], arguments[i], ARGUMENT_SIZE);
}
diff --git a/plugins/CmdLine/src/hooked_events.cpp b/plugins/CmdLine/src/hooked_events.cpp index 6ccac9080a..3226b659b4 100644 --- a/plugins/CmdLine/src/hooked_events.cpp +++ b/plugins/CmdLine/src/hooked_events.cpp @@ -66,8 +66,7 @@ int OnShutdown(WPARAM wParam, LPARAM lParam) int QueueAck(ACKDATA *ack)
{
- int i;
- for (i = cAcks - 1; i > 0; i--)
+ for (int i = cAcks - 1; i > 0; i--)
{
acks[i] = acks[i - 1];
}
@@ -86,8 +85,7 @@ int ClearAckQueue() ACKDATA *GetAck(HANDLE hProcess)
{
- int i;
- for (i = 0; i < cAcks; i++)
+ for (int i = 0; i < cAcks; i++)
{
if (acks[i].hProcess == hProcess)
{
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index 866c319b88..5b4eb32537 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -1355,7 +1355,7 @@ void HandleDatabaseCommand(PCommand command, TArgument *argv, int argc, PReply r if (ParseDatabaseData(&var, buffer, sizeof(buffer), TRUE))
{
reply->code = MIMRES_SUCCESS;
- mir_snprintf(reply->message, reply->cMessage, Translate("'%s/%s' - %s."), module, key, buffer);
+ mir_snprintf(reply->message, reply->cMessage, "'%s/%s' - %s.", module, key, buffer);
}
else{
reply->code = MIMRES_FAILURE;
@@ -1397,23 +1397,17 @@ int ParseProxyType(char *type) {
proxy = PROXY_SOCKS4;
}
- else{
- if (strcmp(lower, "socks5") == 0)
- {
- proxy = PROXY_SOCKS5;
- }
- else{
- if (strcmp(lower, "http") == 0)
- {
- proxy = PROXY_HTTP;
- }
- else{
- if (strcmp(lower, "https") == 0)
- {
- proxy = PROXY_HTTPS;
- }
- }
- }
+ else if (strcmp(lower, "socks5") == 0)
+ {
+ proxy = PROXY_SOCKS5;
+ }
+ else if (strcmp(lower, "http") == 0)
+ {
+ proxy = PROXY_HTTP;
+ }
+ else if (strcmp(lower, "https") == 0)
+ {
+ proxy = PROXY_HTTPS;
}
return proxy;
@@ -1554,11 +1548,9 @@ void HandleProtocolProxyCommand(PCommand command, TArgument *argv, int argc, PRe {
case 4:
{
- char host[256];
- int port;
- char type[256];
+ char host[256], type[256];
GetStringFromDatabase(NULL, module, "NLProxyServer", "<unknown>", host, sizeof(host));
- port = db_get_w(NULL, module, "NLProxyPort", 0);
+ int port = db_get_w(NULL, module, "NLProxyPort", 0);
PrettyProxyType(db_get_b(NULL, module, "NLProxyType", 0), type, sizeof(type));
reply->code = MIMRES_SUCCESS;
@@ -1760,8 +1752,7 @@ DWORD WINAPI OpenMessageWindowThread(void *data) MCONTACT hContact = (MCONTACT) data;
if (hContact)
{
- CallServiceSync(MS_MSG_SENDMESSAGE, hContact, 0);
- CallServiceSync("SRMsg/LaunchMessageWindow", hContact, 0);
+ CallServiceSync(MS_MSG_SENDMESSAGET, hContact, 0);
}
return 0;
@@ -2149,7 +2140,7 @@ void HandleIgnoreCommand(PCommand command, TArgument *argv, int argc, PReply rep if (hContact)
{
- CallService(block ? MS_IGNORE_IGNORE : MS_IGNORE_UNIGNORE, hContact, IGNOREEVENT_ALL);
+ CallService(block ? MS_IGNORE_IGNORE : MS_IGNORE_UNIGNORE, (WPARAM) hContact, IGNOREEVENT_ALL);
}
}
diff --git a/plugins/LangMan/src/options.cpp b/plugins/LangMan/src/options.cpp index 809592c6d8..17a1c321ea 100644 --- a/plugins/LangMan/src/options.cpp +++ b/plugins/LangMan/src/options.cpp @@ -67,8 +67,7 @@ static HIMAGELIST CreateRadioImages(COLORREF clrBk, COLORREF clrText) HBITMAP hbmMono, hbmPrevMono;
RECT rcRadio;
COLORREF clrPrevText, clrPrevBk;
- HBRUSH hbrBk;
- hbrBk = CreateSolidBrush(clrBk);
+ HBRUSH hbrBk = CreateSolidBrush(clrBk);
if (hbrBk!=NULL) {
FillRect(hdc, &rc, hbrBk);
DeleteObject(hbrBk);
@@ -133,7 +132,6 @@ static HIMAGELIST CreateRadioImages(COLORREF clrBk, COLORREF clrText) static void CleanupPluginName(char *szShortName)
{
char *p;
- int len;
/* strip-off anything in brackets */
for(p = szShortName;*p!='\0';++p)
if (*p == '(' || *p == '[') {
@@ -141,21 +139,17 @@ static void CleanupPluginName(char *szShortName) break;
}
/* remove trailing space */
- len = lstrlenA(szShortName);
+ int len = lstrlenA(szShortName);
while(szShortName[0]!='\0' && szShortName[len-1] == ' ')
szShortName[--len] = 0;
}
static void DisplayNotIncludedPlugins(HWND hwndListBox, const LANGPACK_INFO *pack)
{
- WIN32_FIND_DATA wfd;
- HANDLE hFind;
TCHAR szSearch[MAX_PATH], szDir[MAX_PATH], *p;
- HMODULE hModule;
BOOL fNeedsFree;
char buf[128];
TCHAR buf2[128];
- DWORD mirandaVersion;
PLUGININFOEX *pluginInfo;
PLUGININFOEX *(__cdecl *MirandaPluginInfo)(DWORD);
@@ -163,10 +157,12 @@ static void DisplayNotIncludedPlugins(HWND hwndListBox, const LANGPACK_INFO *pac if (!(pack->flags&LPF_DEFAULT) && GetModuleFileName(NULL, szDir, SIZEOF(szDir))) {
p = _tcsrchr(szDir, _T('\\'));
if (p!=NULL) *p = _T('\0');
+ TCHAR szSearch[MAX_PATH];
mir_sntprintf(szSearch, SIZEOF(szSearch), _T("%s\\Plugins\\*.dll"), szDir);
- hFind = FindFirstFile(szSearch, &wfd);
+ WIN32_FIND_DATA wfd;
+ HANDLE hFind = FindFirstFile(szSearch, &wfd);
if (hFind!=INVALID_HANDLE_VALUE) {
- mirandaVersion = CallService(MS_SYSTEM_GETVERSION, 0, 0);
+ DWORD mirandaVersion = CallService(MS_SYSTEM_GETVERSION, 0, 0);
SendMessage(hwndListBox, LB_SETLOCALE, CallService(MS_LANGPACK_GETLOCALE, 0, 0), 0); /* for sort order */
SendMessage(hwndListBox, LB_INITSTORAGE, 128, lstrlenA(pack->szPluginsIncluded)); /* speed up */
do {
@@ -177,15 +173,17 @@ static void DisplayNotIncludedPlugins(HWND hwndListBox, const LANGPACK_INFO *pac p = _tcsrchr(szSearch, _T('.'));
if (p!=NULL) *p = _T('\0');
- { char cFileNameA[MAX_PATH];
+ {
+ char cFileNameA[MAX_PATH];
cFileNameA[0] = '\0';
WideCharToMultiByte(CP_ACP, 0, szSearch, -1, cFileNameA, sizeof(cFileNameA), NULL, NULL);
- if (IsPluginIncluded(pack, cFileNameA)) continue;
+ if (IsPluginIncluded(pack, cFileNameA))
+ continue;
}
/* friendly name of the plugin */
mir_sntprintf(szSearch, SIZEOF(szSearch), _T("%s\\Plugins\\%s"), szDir, wfd.cFileName);
- hModule = GetModuleHandle(szSearch);
+ HMODULE hModule = GetModuleHandle(szSearch);
fNeedsFree = (hModule == NULL);
if (hModule == NULL) {
hModule = LoadLibrary(szSearch);
@@ -198,7 +196,7 @@ static void DisplayNotIncludedPlugins(HWND hwndListBox, const LANGPACK_INFO *pac if (pluginInfo!=NULL && pluginInfo->cbSize >= sizeof(PLUGININFOEX) && pluginInfo->shortName!=NULL) {
lstrcpynA(buf, pluginInfo->shortName, sizeof(buf)); /* buffer safe */
CleanupPluginName(buf);
- mir_sntprintf(buf2, SIZEOF(buf2), TranslateT("%hs (%s)"), buf, CharLower(wfd.cFileName));
+ mir_sntprintf(buf2, SIZEOF(buf2), _T("%hs (%s)"), buf, CharLower(wfd.cFileName));
SendMessage(hwndListBox, LB_ADDSTRING, 0, (LPARAM)buf2);
}
}
diff --git a/plugins/Weather/src/weather.h b/plugins/Weather/src/weather.h index 44952fa752..3f1d9fd286 100644 --- a/plugins/Weather/src/weather.h +++ b/plugins/Weather/src/weather.h @@ -148,7 +148,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // 505 HTTP Version Not Supported
// defaults constants
-#define C_DEFAULT TranslateT("%n [%t, %c]")
+#define C_DEFAULT _T("%n [%t, %c]")
#define N_DEFAULT TranslateT("%c\nTemperature: %t\nFeel-Like: %f\nPressure: %p\nWind: %i %w\nHumidity: %m\nDew Point: %e\nVisibility: %v\n\nSun Rise: %r\nSun Set: %y\n\n5 Days Forecast:\n%[Forecast Day 1]\n%[Forecast Day 2]\n%[Forecast Day 3]\n%[Forecast Day 4]\n%[Forecast Day 5]")
#define B_DEFAULT TranslateT("Feel-Like: %f\nPressure: %p\nWind: %i %w\nHumidity: %m\nDew Point: %e\nVisibility: %v\n\nSun Rise: %r\nSun Set: %y\n\n5 Days Forecast:\n%[Forecast Day 1]\n%[Forecast Day 2]\n%[Forecast Day 3]\n%[Forecast Day 4]\n%[Forecast Day 5]")
#define b_DEFAULT TranslateT("Weather Condition for %n as of %u")
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index f1cfadae46..6f96ae6d2e 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -1000,7 +1000,7 @@ void RebuildMenuOrder(void) TCHAR buf[ 256 ], hotkeyName[ 100 ];
WORD hotKey = GetHotkeyValue(statusHotkeys[j]);
HotkeyToName(hotkeyName, SIZEOF(hotkeyName), HIBYTE(hotKey), LOBYTE(hotKey));
- mir_sntprintf(buf, SIZEOF(buf), LPGENT("%s\t%s"),
+ mir_sntprintf(buf, SIZEOF(buf), _T("%s\t%s"),
cli.pfnGetStatusModeDescription(statusModeList[j], 0), hotkeyName);
tmi.ptszName = buf;
tmi.hotKey = MAKELONG(HIBYTE(hotKey), LOBYTE(hotKey));
@@ -1030,7 +1030,7 @@ static int sttRebuildHotkeys(WPARAM, LPARAM) TCHAR buf[ 256 ], hotkeyName[ 100 ];
WORD hotKey = GetHotkeyValue(statusHotkeys[j]);
HotkeyToName(hotkeyName, SIZEOF(hotkeyName), HIBYTE(hotKey), LOBYTE(hotKey));
- mir_sntprintf(buf, SIZEOF(buf), LPGENT("%s\t%s"), cli.pfnGetStatusModeDescription(statusModeList[j], 0), hotkeyName);
+ mir_sntprintf(buf, SIZEOF(buf), _T("%s\t%s"), cli.pfnGetStatusModeDescription(statusModeList[j], 0), hotkeyName);
tmi.ptszName = buf;
tmi.hotKey = MAKELONG(HIBYTE(hotKey), LOBYTE(hotKey));
MO_ModifyMenuItem(hStatusMainMenuHandles[j], &tmi);
|