diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-11-14 20:51:35 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-11-14 20:51:35 +0000 |
commit | 602b5649c01971b1289b63690bd66743f3f9387c (patch) | |
tree | fd3fbb62cb291024e60ca67ce59b01caf5da8aab | |
parent | 81483e839d08683e35b74f42b2c4081c8101547c (diff) |
minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@10990 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/NewsAggregator/Src/Common.h | 42 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Icons.cpp | 4 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/NewsAggregator.cpp | 2 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Options.cpp | 2 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Services.cpp | 4 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Update.cpp | 4 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Utils.cpp | 10 |
7 files changed, 34 insertions, 34 deletions
diff --git a/plugins/NewsAggregator/Src/Common.h b/plugins/NewsAggregator/Src/Common.h index b9407e7c85..9009e4dca2 100644 --- a/plugins/NewsAggregator/Src/Common.h +++ b/plugins/NewsAggregator/Src/Common.h @@ -59,8 +59,8 @@ extern HWND hAddFeedDlg; extern HANDLE hChangeFeedDlgList, hNetlibUser;
extern UINT_PTR timerId;
// check if Feeds is currently updating
-extern BOOL ThreadRunning;
-extern BOOL UpdateListFlag;
+extern bool ThreadRunning;
+extern bool UpdateListFlag;
extern TCHAR tszRoot[MAX_PATH];
struct ItemInfo
{
@@ -91,13 +91,13 @@ extern HANDLE hUpdateMutex; extern HGENMENU hService2[7];
int NewsAggrInit(WPARAM wParam,LPARAM lParam);
-INT OptInit(WPARAM wParam, LPARAM lParam);
+int OptInit(WPARAM wParam, LPARAM lParam);
int NewsAggrPreShutdown(WPARAM wParam,LPARAM lParam);
-VOID NetlibInit();
-VOID NetlibUnInit();
-VOID InitMenu();
-VOID InitIcons();
-HICON LoadIconEx(const char* name, BOOL big);
+void NetlibInit();
+void NetlibUnInit();
+void InitMenu();
+void InitIcons();
+HICON LoadIconEx(const char* name, bool big);
HANDLE GetIconHandle(const char* name);
INT_PTR NewsAggrGetName(WPARAM wParam, LPARAM lParam);
INT_PTR NewsAggrGetCaps(WPARAM wp, LPARAM lp);
@@ -119,22 +119,22 @@ int OnToolbarLoaded(WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-VOID CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
-VOID CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
-
-BOOL IsMyContact(MCONTACT hContact);
-VOID GetNewsData(TCHAR *szUrl, char** szData, MCONTACT hContact, HWND hwndDlg);
-VOID CreateList(HWND hwndList);
-VOID UpdateList(HWND hwndList);
-VOID DeleteAllItems(HWND hwndList);
-time_t __stdcall DateToUnixTime(const TCHAR *stamp, BOOL FeedType);
-VOID CheckCurrentFeed(MCONTACT hContact);
-VOID CheckCurrentFeedAvatar(MCONTACT hContact);
+void CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
+void CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
+
+bool IsMyContact(MCONTACT hContact);
+void GetNewsData(TCHAR *szUrl, char **szData, MCONTACT hContact, HWND hwndDlg);
+void CreateList(HWND hwndList);
+void UpdateList(HWND hwndList);
+void DeleteAllItems(HWND hwndList);
+time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType);
+void CheckCurrentFeed(MCONTACT hContact);
+void CheckCurrentFeedAvatar(MCONTACT hContact);
TCHAR* CheckFeed(TCHAR* tszURL, HWND hwndDlg);
-void UpdateMenu(BOOL State);
+void UpdateMenu(bool State);
int ImportFeedsDialog();
LPCTSTR ClearText(CMString &value, const TCHAR *message);
-BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal);
+bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal);
int StrReplace(TCHAR *lpszOld, const TCHAR *lpszNew, TCHAR *&lpszStr);
void CreateAuthString(char *auth, MCONTACT hContact, HWND hwndDlg);
INT_PTR CALLBACK AuthenticationProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/plugins/NewsAggregator/Src/Icons.cpp b/plugins/NewsAggregator/Src/Icons.cpp index 3fda249194..011fe57c58 100644 --- a/plugins/NewsAggregator/Src/Icons.cpp +++ b/plugins/NewsAggregator/Src/Icons.cpp @@ -31,12 +31,12 @@ static IconItem iconList[] = { LPGEN("Auto Update Disabled"), "disabled", IDI_DISABLED}
};
-VOID InitIcons()
+void InitIcons()
{
Icon_Register(hInst, LPGEN("News Aggregator"), iconList, SIZEOF(iconList), MODULE);
}
-HICON LoadIconEx(const char *name, BOOL big)
+HICON LoadIconEx(const char *name, bool big)
{
char szSettingName[100];
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", MODULE, name);
diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp index 81e853d9a8..8a901910f0 100644 --- a/plugins/NewsAggregator/Src/NewsAggregator.cpp +++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp @@ -43,7 +43,7 @@ PLUGININFOEX pluginInfoEx = { {0x56cc3f29, 0xccbf, 0x4546, {0xa8, 0xba, 0x98, 0x56, 0x24, 0x8a, 0x41, 0x2a}}
};
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+bool WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
hInst = hinstDLL;
return TRUE;
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp index ec41c43f7d..2ecbcea2e8 100644 --- a/plugins/NewsAggregator/Src/Options.cpp +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -572,7 +572,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA return FALSE;
}
-INT OptInit(WPARAM wParam, LPARAM)
+int OptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.position = 100000000;
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index 104730e4eb..c9f4fea07b 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -232,7 +232,7 @@ INT_PTR NewsAggrRecvMessage(WPARAM, LPARAM lParam) return 0;
}
-void UpdateMenu(BOOL State)
+void UpdateMenu(bool State)
{
CLISTMENUITEM mi = { sizeof(mi) };
@@ -254,7 +254,7 @@ void UpdateMenu(BOOL State) // update the newsaggregator auto-update menu item when click on it
INT_PTR EnableDisable(WPARAM, LPARAM)
{
- UpdateMenu(db_get_b(NULL, MODULE, "AutoUpdate", 1));
+ UpdateMenu(db_get_b(NULL, MODULE, "AutoUpdate", 1) != 0);
NewsAggrSetStatus(db_get_b(NULL, MODULE, "AutoUpdate", 1) ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE, 0);
return 0;
}
diff --git a/plugins/NewsAggregator/Src/Update.cpp b/plugins/NewsAggregator/Src/Update.cpp index 8578f8209f..99129017c8 100644 --- a/plugins/NewsAggregator/Src/Update.cpp +++ b/plugins/NewsAggregator/Src/Update.cpp @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. #include "common.h"
// check if Feed is currently updating
-BOOL ThreadRunning;
+bool ThreadRunning;
UPDATELIST *UpdateListHead = NULL;
UPDATELIST *UpdateListTail = NULL;
@@ -29,7 +29,7 @@ void CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) {
// only run if it is not current updating and the auto update option is enabled
if (!ThreadRunning && !Miranda_Terminated()) {
- BOOL HaveUpdates = FALSE;
+ bool HaveUpdates = FALSE;
for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
if (db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME)) {
double diff = difftime(time(NULL), (time_t)db_get_dw(hContact, MODULE, "LastCheck", 0));
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index fa2f14fac3..cb85c4da41 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -20,9 +20,9 @@ Boston, MA 02111-1307, USA. #include "common.h"
HANDLE hNetlibUser = NULL, hNetlibHttp;
-BOOL UpdateListFlag = FALSE;
+bool UpdateListFlag = FALSE;
-BOOL IsMyContact(MCONTACT hContact)
+bool IsMyContact(MCONTACT hContact)
{
const char *szProto = GetContactProto(hContact);
return szProto != NULL && strcmp(MODULE, szProto) == 0;
@@ -189,7 +189,7 @@ void DeleteAllItems(HWND hwndList) ListView_DeleteAllItems(hwndList);
}
-time_t __stdcall DateToUnixTime(const TCHAR *stamp, BOOL FeedType)
+time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType)
{
struct tm timestamp;
TCHAR date[9];
@@ -213,7 +213,7 @@ time_t __stdcall DateToUnixTime(const TCHAR *stamp, BOOL FeedType) }
else {
TCHAR weekday[4], monthstr[4], timezonesign[2];
- INT day, month, year, hour, min, sec, timezoneh, timezonem;
+ int day, month, year, hour, min, sec, timezoneh, timezonem;
if (_tcsstr(p, _T(","))) {
_stscanf(p, _T("%3s, %d %3s %d %d:%d:%d %1s%02d%02d"), &weekday, &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
if (!lstrcmpi(monthstr, _T("Jan")))
@@ -394,7 +394,7 @@ int StrReplace(TCHAR *lpszOld, const TCHAR *lpszNew, TCHAR *&lpszStr) return nSize;
}
-BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal)
+bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal)
{
NETLIBHTTPREQUEST nlhr = {0};
nlhr.cbSize = sizeof(nlhr);
|