diff options
author | George Hazan <george.hazan@gmail.com> | 2013-05-29 14:04:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-05-29 14:04:14 +0000 |
commit | 8a6cd84bd31d9f5bbcc5f2256e156ed37326cf9b (patch) | |
tree | eda7cae5c35e331d4c04dfb11cc2c6f17418e912 | |
parent | bd3493f9fe92b2bfdcd30f3a63dcab2c608d0606 (diff) |
no more WIN64, only _WIN64
git-svn-id: http://svn.miranda-ng.org/main/trunk@4832 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | include/m_core.h | 6 | ||||
-rw-r--r-- | plugins/CryptoPP/crypto/src/config.h | 4 | ||||
-rw-r--r-- | plugins/CryptoPP/src/commonheaders.h | 2 | ||||
-rw-r--r-- | plugins/LotusNotify/src/LotusNotify.cpp | 160 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Utils.cpp | 72 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber.cpp | 2 | ||||
-rw-r--r-- | protocols/Xfire/src/tools.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/miranda.cpp | 6 | ||||
-rw-r--r-- | src/modules/xml/xmlParser.h | 38 |
9 files changed, 145 insertions, 147 deletions
diff --git a/include/m_core.h b/include/m_core.h index e44ebee070..f67faf7be1 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -179,7 +179,7 @@ typedef INT_PTR (*MIRANDASERVICEPARAM)(WPARAM, LPARAM, LPARAM); typedef INT_PTR (*MIRANDASERVICEOBJ)(void*, LPARAM, LPARAM);
typedef INT_PTR (*MIRANDASERVICEOBJPARAM)(void*, WPARAM, LPARAM, LPARAM);
-#ifdef WIN64
+#ifdef _WIN64
#define CALLSERVICE_NOTFOUND ((INT_PTR)0x8000000000000000)
#else
#define CALLSERVICE_NOTFOUND ((int)0x80000000)
@@ -517,7 +517,7 @@ __forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); }; #define mir_tstrdup mir_strdup
#define mir_tstrndup mir_strndup
#define replaceStrT replaceStr
-
+
#define rtrimt rtrim
#define ltrimt ltrim
#define ltrimpt ltrimp
@@ -658,7 +658,7 @@ MIR_CORE_DLL(void) UnloadCoreModule(void); #endif
#ifndef MIR_CORE_EXPORTS
- #if !defined( WIN64 )
+ #if !defined( _WIN64 )
#pragma comment(lib, "mir_core.lib")
#else
#pragma comment(lib, "mir_core64.lib")
diff --git a/plugins/CryptoPP/crypto/src/config.h b/plugins/CryptoPP/crypto/src/config.h index a33577577e..02f05f1ca3 100644 --- a/plugins/CryptoPP/crypto/src/config.h +++ b/plugins/CryptoPP/crypto/src/config.h @@ -261,7 +261,7 @@ NAMESPACE_END #define CRYPTOPP_DISABLE_SSE2
#endif
-#ifdef WIN64
+#ifdef _WIN64
#define CRYPTOPP_DISABLE_ASM
#endif
@@ -317,7 +317,7 @@ NAMESPACE_END # define CRYPTOPP_NOINLINE __attribute__((noinline))
#else
# define CRYPTOPP_NOINLINE_DOTDOTDOT ...
-# define CRYPTOPP_NOINLINE
+# define CRYPTOPP_NOINLINE
#endif
// how to declare class constants
diff --git a/plugins/CryptoPP/src/commonheaders.h b/plugins/CryptoPP/src/commonheaders.h index d6eae14c33..aa2b79c773 100644 --- a/plugins/CryptoPP/src/commonheaders.h +++ b/plugins/CryptoPP/src/commonheaders.h @@ -9,7 +9,7 @@ #define _CRT_SECURE_NO_WARNINGS
#define _SCL_SECURE_NO_WARNINGS
#define NOMINMAX
- #ifndef WIN64
+ #ifndef _WIN64
#define _USE_32BIT_TIME_T
#endif
#endif
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index 2cc5c66e64..dbfea1a442 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -98,7 +98,7 @@ PLUGININFOEX pluginInfo = { // authentication callback futnction from extension manager called by nnotes.dll
-STATUS LNPUBLIC __stdcall EMCallBack (EMRECORD * pData)
+STATUS LNPUBLIC __stdcall EMCallBack (EMRECORD * pData)
{
VARARG_PTR pArgs;
DWORD maxPwdLen;
@@ -123,7 +123,7 @@ STATUS LNPUBLIC __stdcall EMCallBack (EMRECORD * pData) }
-//Main entry point for Ext Manager of Lotus API. called by nnotes.dll
+//Main entry point for Ext Manager of Lotus API. called by nnotes.dll
//It don't work (don't know why), and Mirandas Load function is called with value 1 or 0 as parameter...
__declspec(dllexport)STATUS LNPUBLIC MainEntryPoint (void)
{
@@ -132,14 +132,14 @@ __declspec(dllexport)STATUS LNPUBLIC MainEntryPoint (void) if(rc) {
//Extension magager don't know who we are :(
startuperror+=8;
- // Get the info from the .ini file
+ // Get the info from the .ini file
}
return rc;
}
//Clear Extension Manager when exiting
-void ExtClear()
+void ExtClear()
{
STATUS status;
if (0 != hLotusRegister) {
@@ -211,7 +211,7 @@ void deleteElements() {
struct HISTORIA *cur = first, *del;
while(cur != NULL)
- {
+ {
del = cur;
cur = cur->next;
deletePopupsHandles(&(del->pq),FALSE);
@@ -298,7 +298,7 @@ BOOL checkFilters(TCHAR* str, int field) _tcsncpy_s(buff, SIZEOF(buff), settingFilterTo, SIZEOF(buff));
break;
}
-
+
while(strptr = _tcschr(buff, ';'))
{
@@ -317,7 +317,7 @@ BOOL checkFilters(TCHAR* str, int field) }
-//subfunction called from popup plugin callback function
+//subfunction called from popup plugin callback function
void Click(HWND hWnd,BOOL execute)
{
POPUPATT *pid=NULL;
@@ -353,7 +353,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA if (HIWORD(wParam) == STN_CLICKED)//client clicked on popup with left mouse button
{
Click(hWnd,TRUE);
-
+
//system(settingCommand);
//if(!settingOnceOnly)
//addNewId(noteID);
@@ -367,7 +367,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA {
Click(hWnd,FALSE);
break;
- }
+ }
case UM_INITPOPUP:
{
@@ -378,14 +378,14 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA break;
}
- case UM_FREEPLUGINDATA:
+ case UM_FREEPLUGINDATA:
{
POPUPATT * mpd = NULL;
mpd = (POPUPATT*)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd,(LPARAM)mpd);
if (mpd > 0) free(mpd);
return TRUE; //TRUE or FALSE is the same, it gets ignored.
}
-
+
default:
break;
}
@@ -427,7 +427,7 @@ BOOL checkNotesIniFile(BOOL bInfo) }
}
}
-
+
if(settingIniAnswer == 1)
{
if(strlen(tmp) > 0) {
@@ -440,7 +440,7 @@ BOOL checkNotesIniFile(BOOL bInfo) (OSSetEnvironmentVariable1) ("EXTMGR_ADDINS", tmp); //set notes.ini entry
if(bInfo) {
MessageBox(NULL, TranslateT("notes.ini modified correctly. Miranda restart required."), TranslateT("LotusNotify plugin configuration"), MB_OK);
- } else{
+ } else{
ErMsgT(TranslateT("notes.ini modified correctly. Miranda restart required."));
}
return TRUE;
@@ -480,7 +480,7 @@ void showMsg(TCHAR* sender,TCHAR* text, DWORD id, char *strUID) _tcscpy_s(ppd.lptzText, SIZEOF(ppd.lptzText), text);
if(settingSetColours)
{
- ppd.colorBack = settingBgColor;
+ ppd.colorBack = settingBgColor;
ppd.colorText = settingFgColor;
}
ppd.PluginWindowProc = PopupDlgProc;
@@ -521,7 +521,7 @@ void ErMsgT(TCHAR* msg) }
-//Lotus error occured so translate it
+//Lotus error occured so translate it
void ErMsgByLotusCode(STATUS erno)
{
char far error_text_LMBCS[200];
@@ -537,7 +537,7 @@ void ErMsgByLotusCode(STATUS erno) }
-//set menu avainability
+//set menu avainability
static void LNEnableMenuItem(HANDLE hMenuItem, BOOL bEnable)
{
log_p(L"LNEnableMenuItem: bEnable=%d", bEnable);
@@ -554,7 +554,7 @@ static void LNEnableMenuItem(HANDLE hMenuItem, BOOL bEnable) int check() {
log_p(L"check: Entering check function. running=%d", running);
-
+
if(startuperror) {
int cnt;
for(cnt = 0; cnt <= 4; cnt++)
@@ -562,7 +562,7 @@ int check() { ErMsgT(TranslateTS(startuperrors[cnt]));
return 1;
}
-
+
if (Plugin_Terminated || Miranda_Terminated()){
log_p(L"check: Plugin_Terminated (=%d) OR Miranda_Terminated()", Plugin_Terminated);
return 0;
@@ -622,7 +622,7 @@ void checkthread(void*) goto errorblock;
}
log_p(L"checkthread: OSPathNetConstruct: %S", fullpath);
-
+
if (error = (NSFDbOpen1) (fullpath, &db_handle)) {
if(strcmp(settingServerSec, "") != 0) {
if (error = (OSPathNetConstruct1)(NULL, settingServerSec, settingDatabase, fullpath)) {
@@ -658,15 +658,15 @@ void checkthread(void*) }
log(L"checkthread: Unread Table updated");
assert(hTable);
-
+
while((IDScan1)(hTable, fFirst, ¬eID)) {
-
+
WORD Att;
BLOCKID bhAttachment;
DWORD cSize = 0;
DWORD attSize = 0;
- OID retNoteOID;
+ OID retNoteOID;
TIMEDATE retModified; /* modified timedate */
WORD retNoteClass; /* note class */
TIMEDATE sendDate;
@@ -676,7 +676,7 @@ void checkthread(void*) log_p(L"checkthread: Plugin_Terminated (=%d) OR Miranda_Terminated()", Plugin_Terminated);
break;
}
-
+
log_p(L"checkthread: Getting info about: %d", noteID);
fFirst = FALSE;
@@ -697,19 +697,19 @@ void checkthread(void*) //show again, but only not clicked (id added to list on Left Button click)
continue;
}
-
+
log(L"checkthread: skiped-show again, but only not clicked (id added to list on Left Button click)");
if(settingNewest && settingNewestID >= noteID){
//only newest option enabled, so if old id don't show it
continue;
}
-
+
log(L"checkthread: skiped-only newest option enabled, so if old id don't show it");
//if(((!settingOnceOnly||(settingOnceOnly&&settingNonClickedOnly))&&existElem(noteID))||(settingNewest&&settingNewestID>=noteID))
//continue;
-
+
if (error = (NSFNoteOpen1) (db_handle, noteID, 0, ¬e_handle)) {
continue;
}
@@ -792,7 +792,7 @@ void checkthread(void*) );
#endif
-
+
if(attSize){
WCHAR field_attachments_UNICODE[MAX_FIELD];
swprintf_s(field_attachments_UNICODE, SIZEOF(field_attachments_UNICODE), TranslateW(L"Attachments: %d bytes"), attSize);
@@ -910,7 +910,7 @@ void fillServersList(HWND hwndDlg) BYTE far *pServerList; /* Pointer to start of Server List */
WORD wServerCount; /* Number of servers in list. */
WORD far *pwServerLength; /* Index to array of servername lens */
- BYTE far *pServerName;
+ BYTE far *pServerName;
STATUS error = NOERROR; /* Error return from API routines. */
char ServerString[MAXPATH]; /* String to hold server names. */
LPSTR szServerString = ServerString;
@@ -922,7 +922,7 @@ void fillServersList(HWND hwndDlg) error = (NSGetServerList1)(NULL, &hServerList);
if (error == NOERROR) {
-
+
pServerList = (BYTE far *)(OSLockObject1)(hServerList);
wServerCount = (WORD) *pServerList;
@@ -933,7 +933,7 @@ void fillServersList(HWND hwndDlg) for (i=0; i<wServerCount; pServerName+=pwServerLength[i], i++)
{
memmove (szServerString, pServerName, pwServerLength[i]);
- szServerString[pwServerLength[i]] = '\0';
+ szServerString[pwServerLength[i]] = '\0';
decodeServer(ServerString);
SendDlgItemMessageA(hwndDlg, IDC_SERVER, CB_ADDSTRING, 0, (LPARAM)szServerString);
}
@@ -952,7 +952,7 @@ void fillServersList(HWND hwndDlg) void lookupLotusDefaultSettings(HWND hwndDlg)
{
char tmp[MAXENVVALUE+1];
- // Get the info from the .ini file
+ // Get the info from the .ini file
if(hLotusDll) {
if ((OSGetEnvironmentString1) ("MailFile", tmp, MAXENVVALUE)) //path to mail file
SetDlgItemTextA(hwndDlg, IDC_DATABASE, tmp); //and set fields in opt. dialog
@@ -962,7 +962,7 @@ void lookupLotusDefaultSettings(HWND hwndDlg) SetDlgItemTextA(hwndDlg, IDC_SERVER, tmp);
}
}
-
+
}
//get variables values stored in db.
@@ -977,7 +977,7 @@ void LoadSettings() //if(!db_get(NULL, PLUGINNAME, "LNInterval1",&dbv))
// settingInterval1 = int(dbv.lVal);
//db_free(&dbv);
- //settingInterval=dbv.lVal;
+ //settingInterval=dbv.lVal;
if(!db_get_s(NULL, PLUGINNAME, "LNDatabase", &dbv))
strncpy_s(settingDatabase, _countof(settingDatabase), dbv.pszVal, SIZEOF(settingDatabase));
db_free(&dbv);
@@ -997,7 +997,7 @@ void LoadSettings() if(!db_get_s(NULL, PLUGINNAME, "LNParameters", &dbv, DBVT_ASCIIZ))
strncpy_s(settingParameters, _countof(settingParameters), dbv.pszVal, SIZEOF(settingParameters));
db_free(&dbv);
-
+
if(!db_get_ts(NULL, PLUGINNAME, "LNFilterSender",&dbv))
_tcsncpy_s(settingFilterSender, SIZEOF(settingFilterSender), dbv.ptszVal, SIZEOF(settingFilterSender));
db_free(&dbv);
@@ -1069,10 +1069,10 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L hwnd = GetDlgItem(hwndDlg, IDC_FGCOLOR);
EnableWindow(hwnd, FALSE);
}
-
+
//SendDlgItemMessage(hwndDlg, IDC_SERVER, CB_SELECTSTRING ,-1,(LPARAM)(LPCSTR)settingServer);
-
+
// initialise and fill listbox
hwndList = GetDlgItem(hwndDlg, IDC_STATUS);
ListView_DeleteAllItems(hwndList);
@@ -1081,18 +1081,18 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L // Initialize the LVCOLUMN structure.
// The mask specifies that the format, width, text, and
- // subitem members of the structure are valid.
+ // subitem members of the structure are valid.
LVCOLUMN lvc={0};
- lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
+ lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
lvc.fmt = LVCFMT_LEFT;
-
+
lvc.iSubItem = 0;
- lvc.pszText = TranslateT("Status");
+ lvc.pszText = TranslateT("Status");
lvc.cx = 120; // width of column in pixels
ListView_InsertColumn(hwndList, 0, &lvc);
// Some code to create the list-view control.
- // Initialize LVITEM members that are common to all items.
+ // Initialize LVITEM members that are common to all items.
LVITEM lvI={0};
lvI.mask = LVIF_TEXT;
for(int i = 0; i < STATUS_COUNT; i++) {
@@ -1137,7 +1137,7 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L switch(LOWORD(wParam))
{
case IDC_DATABASE: GetDlgItemTextA(hwndDlg, IDC_DATABASE, settingDatabase, sizeof(settingDatabase)); break;
- case IDC_SERVER:
+ case IDC_SERVER:
{
switch(HIWORD(wParam))
{
@@ -1150,9 +1150,9 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L SetDlgItemTextA(hwndDlg,IDC_SERVER,text);
break;
}
-
+
//case CBN_EDITCHANGE:
-
+
case CBN_DROPDOWN:
{
SendDlgItemMessage(hwndDlg, IDC_SERVER, CB_RESETCONTENT ,0, 0);
@@ -1165,23 +1165,23 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L }
case IDC_SERVERSEC: GetDlgItemTextA(hwndDlg, IDC_SERVERSEC, settingServerSec, sizeof(settingServerSec)); break;
case IDC_PASSWORD: GetDlgItemTextA(hwndDlg, IDC_PASSWORD, settingPassword, sizeof(settingPassword)); break;
-
+
case IDC_INTERVAL: settingInterval =GetDlgItemInt(hwndDlg, IDC_INTERVAL, NULL, FALSE); break;
case IDC_INTERVAL1: settingInterval1 =GetDlgItemInt(hwndDlg, IDC_INTERVAL1, NULL, TRUE); break;
case IDC_COMMAND: GetDlgItemTextA(hwndDlg, IDC_COMMAND, settingCommand, sizeof(settingCommand)); break;
case IDC_PARAMETERS: GetDlgItemTextA(hwndDlg, IDC_PARAMETERS, settingParameters, sizeof(settingParameters)); break;
- case IDC_ONCEONLY:
+ case IDC_ONCEONLY:
{
HWND hwnd = GetDlgItem(hwndDlg, IDC_NONCLICKEDONLY);
- settingOnceOnly=(BYTE) IsDlgButtonChecked(hwndDlg, IDC_ONCEONLY);
- EnableWindow(hwnd, settingOnceOnly);
+ settingOnceOnly=(BYTE) IsDlgButtonChecked(hwndDlg, IDC_ONCEONLY);
+ EnableWindow(hwnd, settingOnceOnly);
break;
}
case IDC_NONCLICKEDONLY: settingNonClickedOnly=(BYTE) IsDlgButtonChecked(hwndDlg, IDC_NONCLICKEDONLY); break;
case IDC_NEWEST: settingNewest =(BYTE) IsDlgButtonChecked(hwndDlg, IDC_NEWEST); break;
case IDC_SHOWERROR: settingShowError=(BYTE) IsDlgButtonChecked(hwndDlg, IDC_SHOWERROR); break;
-
+
case IDC_SETCOLOURS:
{
HWND hwnd = GetDlgItem(hwndDlg, IDC_BGCOLOR);
@@ -1211,7 +1211,7 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L checkNotesIniFile(TRUE);
break;
}
-
+
case IDC_BUTTON_ADD_SENDER_FILTER:
{
char tmp[255];
@@ -1264,7 +1264,7 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L LoadSettings();
return TRUE;
case PSN_APPLY:
-
+
{
char buff[128];
int i=0;
@@ -1323,7 +1323,7 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L db_set_ts(NULL, PLUGINNAME, "LNFilterTo", settingFilterTo);
}
-
+
return TRUE;
break;
@@ -1346,15 +1346,15 @@ INT_PTR CALLBACK DlgProcLotusNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L SendMessage( GetParent(hwndDlg), PSM_CHANGED, 0, 0 );
}
break;
-
+
}
break;
}
}
break; //switch(msg)
-
-
- }
+
+
+ }
return FALSE;
}
@@ -1406,7 +1406,7 @@ INT_PTR TMLoadIcon(WPARAM wParam, LPARAM lParam) case PLI_ONLINE:
case PLI_PROTOCOL: id=IDI_ICON1; break; // IDI_TM is the main icon for the protocol
case PLI_OFFLINE: id=IDI_ICON2; break;
- default: return 0;
+ default: return 0;
}
return (int)LoadImage(hInst, MAKEINTRESOURCE(id), IMAGE_ICON, GetSystemMetrics(wParam&PLIF_SMALL?SM_CXSMICON:SM_CXICON), GetSystemMetrics(wParam&PLIF_SMALL?SM_CYSMICON:SM_CYICON), 0);
}
@@ -1416,11 +1416,11 @@ INT_PTR SetStatus(WPARAM wParam, LPARAM lParam) {
if (wParam == ID_STATUS_OFFLINE){
-
+
// the status has been changed to online (maybe run some more code)
LNEnableMenuItem(hMenuHandle, FALSE);
diffstat = 0;
-
+
} else if (wParam == ID_STATUS_ONLINE){
diffstat = 0;
@@ -1446,7 +1446,7 @@ INT_PTR SetStatus(WPARAM wParam, LPARAM lParam) }
}
} else {
-
+
int retv = 0;
if(settingStatus[wParam - ID_STATUS_ONLINE])
retv = SetStatus(ID_STATUS_OFFLINE, lParam);
@@ -1456,9 +1456,9 @@ INT_PTR SetStatus(WPARAM wParam, LPARAM lParam) diffstat = wParam;
return retv;
// the status has been changed to unknown (maybe run some more code)
-
+
}
-
+
//broadcast the message
if(currentStatus != wParam)
ProtoBroadcastAck(PLUGINNAME,NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)currentStatus, wParam);
@@ -1470,14 +1470,14 @@ INT_PTR SetStatus(WPARAM wParam, LPARAM lParam) void checkEnvPath(TCHAR *path)
{
-
+
TCHAR *cur;
TCHAR nowy[2048]={0};
TCHAR *found;
int len;
log_p(L"checkEnvPath: [%s]", path);
-
+
_tcslwr(path);
cur = _tgetenv(_T("PATH"));
_tcslwr(cur);
@@ -1494,7 +1494,7 @@ void checkEnvPath(TCHAR *path) _tcscat_s(nowy, _countof(nowy), _T(";"));
_tcscat_s(nowy, _countof(nowy), path);
_tcscat_s(nowy, _countof(nowy), _T(";"));
-
+
_tputenv(nowy);
}
@@ -1548,14 +1548,14 @@ static int modulesloaded(WPARAM wParam, LPARAM lParam) LNEnableMenuItem(hMenuHandle, !running);//disable menu cause lotus is not initialized
} else {
-
+
log(L"Checking Notes Ini File");
if (!checkNotesIniFile(FALSE)) {
startuperror += 16;
}
}
}
-
+
} else {
startuperror += 2;
}
@@ -1596,28 +1596,28 @@ extern "C" int __declspec(dllexport) Load(void) if(rc){
//Extension magager don't know who we are :(
startuperror+=8;
- // Get the info from the .ini file
+ // Get the info from the .ini file
}
//log_p(L"Load: Registered Ext. Mngr. res=%d", rc);
return rc;
}
bMirandaCall=TRUE;
-
+
init_pluginname();
logRegister();
log_p(L"Load: Entering LotusNotify.dll Load() bMirandaCall=%d PLUGINNAME=[%S]", bMirandaCall, PLUGINNAME);
-
+
if(!(hCheckEvent = CreateHookableEvent("LotusNotify/Check"))) //check if there is another copy of plugin running
{
- second = TRUE;
+ second = TRUE;
}
- hCheckHook = HookEvent("LotusNotify/Check", eventCheck); //hook function to menu click event
+ hCheckHook = HookEvent("LotusNotify/Check", eventCheck); //hook function to menu click event
if(!second) //if its first plugin instance
- {
+ {
//function that will be called on menu click
hMenuService = CreateServiceFunction("LotusNotify/MenuCommand", PluginMenuCommand);
@@ -1628,7 +1628,7 @@ extern "C" int __declspec(dllexport) Load(void) mi.ptszName = LPGENT("&Check Lotus");
mi.pszService = "LotusNotify/MenuCommand"; //service name thet listning for menu call
hMenuHandle = Menu_AddMainMenuItem(&mi); //create menu pos.
-
+
LNEnableMenuItem(hMenuHandle ,FALSE);
}
@@ -1637,7 +1637,7 @@ extern "C" int __declspec(dllexport) Load(void) pd.szName = PLUGINNAME;
pd.type = PROTOTYPE_PROTOCOL;
CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
-
+
//set all contacts to offline ///TODO: are that contacts exists ?
for(HANDLE hContact = db_find_first(PLUGINNAME); hContact; hContact = db_find_next(hContact, PLUGINNAME)){
db_set_w(hContact, PLUGINNAME, "status", ID_STATUS_OFFLINE);
@@ -1686,17 +1686,17 @@ extern "C" int __declspec(dllexport) Unload() if (hCheckHook) UnhookEvent(hCheckHook);
if (hHookModulesLoaded) UnhookEvent(hHookModulesLoaded);
if (hHookPreShutdown) UnhookEvent(hHookPreShutdown);
-
+
log(L"Unload: ok");
logUnregister();
-
+
return 0;
}
extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
{
-#ifdef WIN64
+#ifdef _WIN64
MessageBox(NULL
, TranslateT("LotusNotify.dll can not work with 64bit Miranda. (Lotus client is 32bit only)")
, TranslateT("LotusNotify")
@@ -1713,7 +1713,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_LOTUSNO BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
{
-
+
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
@@ -1729,5 +1729,3 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved) }
return TRUE;
}
-
-
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 27d2a13185..bb572b2489 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -115,7 +115,7 @@ void LoadOptions() PopupOptions.LeftClickAction= db_get_b(NULL, MODNAME, "LeftClickAction", DEFAULT_POPUP_LCLICK);
PopupOptions.RightClickAction = db_get_b(NULL, MODNAME, "RightClickAction", DEFAULT_POPUP_RCLICK);
PopupOptions.Timeout = db_get_dw(NULL, MODNAME, "Timeout", DEFAULT_TIMEOUT_VALUE);
-
+
opts.bUpdateOnStartup = db_get_b(NULL, MODNAME, "UpdateOnStartup", DEFAULT_UPDATEONSTARTUP);
opts.bOnlyOnceADay = db_get_b(NULL, MODNAME, "OnlyOnceADay", DEFAULT_ONLYONCEADAY);
opts.bUpdateOnPeriod = db_get_b(NULL, MODNAME, "UpdateOnPeriod", DEFAULT_UPDATEONPERIOD);
@@ -172,7 +172,7 @@ int Get_CRC(unsigned char* buffer, ULONG bufsize) for(int i = 0; i < len; i++)
crc = (crc >> 8) ^ crc32_table[(crc & 0xFF) ^ buffer[i]];
-
+
// Exclusive OR the result with the beginning value.
return crc^0xffffffff;
}
@@ -196,7 +196,7 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT& baseUrl, SERVLIST& arHashes) {
REPLACEVARSARRAY vars[2];
vars[0].lptzKey = _T("platform");
- #ifdef WIN64
+ #ifdef _WIN64
vars[0].lptzValue = _T("64");
#else
vars[0].lptzValue = _T("32");
@@ -455,20 +455,20 @@ void __stdcall OpenPluginOptions(void*) // FUNCTION: IsRunAsAdmin()
//
-// PURPOSE: The function checks whether the current process is run as
-// administrator. In other words, it dictates whether the primary access
-// token of the process belongs to user account that is a member of the
+// PURPOSE: The function checks whether the current process is run as
+// administrator. In other words, it dictates whether the primary access
+// token of the process belongs to user account that is a member of the
// local Administrators group and it is elevated.
//
-// RETURN VALUE: Returns TRUE if the primary access token of the process
-// belongs to user account that is a member of the local Administrators
+// RETURN VALUE: Returns TRUE if the primary access token of the process
+// belongs to user account that is a member of the local Administrators
// group and it is elevated. Returns FALSE if the token does not.
//
-// EXCEPTION: If this function fails, it throws a C++ DWORD exception which
+// EXCEPTION: If this function fails, it throws a C++ DWORD exception which
// contains the Win32 error code of the failure.
//
// EXAMPLE CALL:
-// try
+// try
// {
// if (IsRunAsAdmin())
// wprintf (L"Process is run as administrator\n");
@@ -489,18 +489,18 @@ BOOL IsRunAsAdmin() // Allocate and initialize a SID of the administrators group.
SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
if (!AllocateAndInitializeSid(
- &NtAuthority,
- 2,
- SECURITY_BUILTIN_DOMAIN_RID,
- DOMAIN_ALIAS_RID_ADMINS,
- 0, 0, 0, 0, 0, 0,
+ &NtAuthority,
+ 2,
+ SECURITY_BUILTIN_DOMAIN_RID,
+ DOMAIN_ALIAS_RID_ADMINS,
+ 0, 0, 0, 0, 0, 0,
&pAdministratorsGroup))
{
dwError = GetLastError();
goto Cleanup;
}
- // Determine whether the SID of administrators group is bEnabled in
+ // Determine whether the SID of administrators group is bEnabled in
// the primary access token of the process.
if (!CheckTokenMembership(NULL, pAdministratorsGroup, &fIsRunAsAdmin))
{
@@ -528,32 +528,32 @@ Cleanup: //
// FUNCTION: IsProcessElevated()
//
-// PURPOSE: The function gets the elevation information of the current
-// process. It dictates whether the process is elevated or not. Token
-// elevation is only available on Windows Vista and newer operating
-// systems, thus IsProcessElevated throws a C++ exception if it is called
-// on systems prior to Windows Vista. It is not appropriate to use this
+// PURPOSE: The function gets the elevation information of the current
+// process. It dictates whether the process is elevated or not. Token
+// elevation is only available on Windows Vista and newer operating
+// systems, thus IsProcessElevated throws a C++ exception if it is called
+// on systems prior to Windows Vista. It is not appropriate to use this
// function to determine whether a process is run as administartor.
//
-// RETURN VALUE: Returns TRUE if the process is elevated. Returns FALSE if
+// RETURN VALUE: Returns TRUE if the process is elevated. Returns FALSE if
// it is not.
//
-// EXCEPTION: If this function fails, it throws a C++ DWORD exception
-// which contains the Win32 error code of the failure. For example, if
-// IsProcessElevated is called on systems prior to Windows Vista, the error
+// EXCEPTION: If this function fails, it throws a C++ DWORD exception
+// which contains the Win32 error code of the failure. For example, if
+// IsProcessElevated is called on systems prior to Windows Vista, the error
// code will be ERROR_INVALID_PARAMETER.
//
-// NOTE: TOKEN_INFORMATION_CLASS provides TokenElevationType to check the
+// NOTE: TOKEN_INFORMATION_CLASS provides TokenElevationType to check the
// elevation type (TokenElevationTypeDefault / TokenElevationTypeLimited /
-// TokenElevationTypeFull) of the process. It is different from
-// TokenElevation in that, when UAC is turned off, elevation type always
-// returns TokenElevationTypeDefault even though the process is elevated
-// (Integrity Level == High). In other words, it is not safe to say if the
-// process is elevated based on elevation type. Instead, we should use
+// TokenElevationTypeFull) of the process. It is different from
+// TokenElevation in that, when UAC is turned off, elevation type always
+// returns TokenElevationTypeDefault even though the process is elevated
+// (Integrity Level == High). In other words, it is not safe to say if the
+// process is elevated based on elevation type. Instead, we should use
// TokenElevation.
//
// EXAMPLE CALL:
-// try
+// try
// {
// if (IsProcessElevated())
// wprintf (L"Process is elevated\n");
@@ -583,9 +583,9 @@ BOOL IsProcessElevated() DWORD dwSize;
if (!GetTokenInformation(hToken, TokenElevation, &elevation, sizeof(elevation), &dwSize))
{
- // When the process is run on operating systems prior to Windows
- // Vista, GetTokenInformation returns FALSE with the
- // ERROR_INVALID_PARAMETER error code because TokenElevation is
+ // When the process is run on operating systems prior to Windows
+ // Vista, GetTokenInformation returns FALSE with the
+ // ERROR_INVALID_PARAMETER error code because TokenElevation is
// not supported on those operating systems.
dwError = GetLastError();
goto Cleanup;
@@ -630,7 +630,7 @@ int TransactPipe(int opcode, const TCHAR *p1, const TCHAR *p2) else *dst++ = 0;
DWORD dwBytes = 0, dwError;
- if ( WriteFile(hPipe, buf, (DWORD)((BYTE*)dst - buf), &dwBytes, NULL) == 0)
+ if ( WriteFile(hPipe, buf, (DWORD)((BYTE*)dst - buf), &dwBytes, NULL) == 0)
return 0;
dwError = 0;
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 2c76951eb0..e18f261c55 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -120,7 +120,7 @@ static int OnModulesLoaded(WPARAM, LPARAM) bSecureIM = (ServiceExists("SecureIM/IsContactSecured"));
bMirOTR = (int)GetModuleHandle(_T("mirotr.dll"));
bNewGPG = (int)GetModuleHandle(_T("new_gpg.dll"));
- #ifdef WIN64
+ #ifdef _WIN64
bPlatform = 1;
#else
bPlatform = 0;
diff --git a/protocols/Xfire/src/tools.cpp b/protocols/Xfire/src/tools.cpp index 77f63ac661..9cfbb44662 100644 --- a/protocols/Xfire/src/tools.cpp +++ b/protocols/Xfire/src/tools.cpp @@ -242,7 +242,7 @@ char* GetLaunchPath(char*launch) //roll bits, vllt ein tickschneller als die funktionen von winsock
unsigned short r(unsigned short data)
{
- #if defined(WIN64)
+ #if defined(_WIN64)
return ((data & 0xFF) << 8) + (data >> 8);
#else
_asm {
diff --git a/src/mir_core/miranda.cpp b/src/mir_core/miranda.cpp index 20ba050774..640f2d89db 100644 --- a/src/mir_core/miranda.cpp +++ b/src/mir_core/miranda.cpp @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-12 Miranda IM, 2012-13 Miranda NG project,
+Copyright 2000-12 Miranda IM, 2012-13 Miranda NG project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -65,7 +65,7 @@ static void LoadCoreModule(void) hStackMutex = CreateMutex(NULL, FALSE, NULL);
hThreadQueueEmpty = CreateEvent(NULL, TRUE, TRUE, NULL);
- #ifdef WIN64
+ #ifdef _WIN64
HMODULE mirInst = GetModuleHandleA("miranda64.exe");
#else
HMODULE mirInst = GetModuleHandleA("miranda32.exe");
diff --git a/src/modules/xml/xmlParser.h b/src/modules/xml/xmlParser.h index 546171324f..731c3a128e 100644 --- a/src/modules/xml/xmlParser.h +++ b/src/modules/xml/xmlParser.h @@ -66,7 +66,7 @@ * problem, during all the debugging session, I am now using a very fast DLL version of the
* XMLParser Library (the DLL is compiled in release mode). Using the DLL version of
* the XMLParser Library allows me to have lightening XML parsing speed even in debug!
- * Other than that, the DLL version is useless: In the release version of my tool,
+ * Other than that, the DLL version is useless: In the release version of my tool,
* I always use the normal, ".cpp"-based, XMLParser Library (I simply include the
* <a href = "../../xmlParser.cpp">xmlParser.cpp</a> and
* <a href = "../../xmlParser.h">xmlParser.h</a> files into the project).
@@ -95,7 +95,7 @@ // must be defined) or utf8-mode(the pre-processor variable must be undefined).
#define _XMLWIDECHAR
-#if defined(WIN32) || defined(UNDER_CE) || defined(_WIN32) || defined(WIN64) || defined(__BORLANDC__)
+#if defined(WIN32) || defined(UNDER_CE) || defined(_WIN32) || defined(_WIN64) || defined(__BORLANDC__)
// comment the next line if you are under windows and the compiler is not Microsoft Visual Studio (6.0 or .NET) or Borland
#define _XMLWINDOWS
#endif
@@ -153,10 +153,10 @@ /// Enumeration used to manage type of data. Use in conjunction with structure XMLNodeContents
typedef enum XMLElementType
{
- eNodeChild = 0,
- eNodeAttribute = 1,
- eNodeText = 2,
- eNodeClear = 3,
+ eNodeChild = 0,
+ eNodeAttribute = 1,
+ eNodeText = 2,
+ eNodeClear = 3,
eNodeNULL = 4
} XMLElementType;
@@ -267,8 +267,8 @@ public: * with appropriate white spaces and carriage returns. if pnSize is given it returns the size in character of the string. */
/// Save the content of an xmlNode inside a file
- XMLError writeToFile(XMLCSTR filename,
- const char *encoding = NULL,
+ XMLError writeToFile(XMLCSTR filename,
+ const char *encoding = NULL,
char nFormat = 1) const;
/**< If nFormat == 0, no formatting is required otherwise this returns an user friendly XML string from a given element with appropriate white spaces and carriage returns.
* If the global parameter "characterEncoding == encoding_UTF8", then the "encoding" parameter is ignored and always set to "utf-8".
@@ -288,9 +288,9 @@ public: XMLNode getChildNode(int i=0) const; ///< return ith child node
XMLNode getChildNode(XMLCSTR name, int i) const; ///< return ith child node with specific name (return an empty node if failing). If i == -1, this returns the last XMLNode with the given name.
XMLNode getChildNode(XMLCSTR name, int *i = NULL) const; ///< return next child node with specific name (return an empty node if failing)
- XMLNode getChildNodeWithAttribute(XMLCSTR tagName,
- XMLCSTR attributeName,
- XMLCSTR attributeValue = NULL,
+ XMLNode getChildNodeWithAttribute(XMLCSTR tagName,
+ XMLCSTR attributeName,
+ XMLCSTR attributeValue = NULL,
int *i = NULL) const; ///< return child node with specific name/attribute (return an empty node if failing)
XMLNode getChildNodeByPath(XMLSTR path, char createNodeIfMissing = 0, XMLCHAR sep = '/');
///< return the first child node with specific path. WARNING: the value of the parameter "path" is destroyed!
@@ -458,12 +458,12 @@ public: /// Enumeration for XML character encoding.
typedef enum XMLCharEncoding
{
- char_encoding_error = 0,
- char_encoding_UTF8 = 1,
- char_encoding_legacy = 2,
- char_encoding_ShiftJIS = 3,
- char_encoding_GB2312 = 4,
- char_encoding_Big5 = 5,
+ char_encoding_error = 0,
+ char_encoding_UTF8 = 1,
+ char_encoding_legacy = 2,
+ char_encoding_ShiftJIS = 3,
+ char_encoding_GB2312 = 4,
+ char_encoding_Big5 = 5,
char_encoding_GBK = 6 // this is actually the same as Big5
} XMLCharEncoding;
@@ -471,7 +471,7 @@ public: * @{ */
/// Sets the global options for the conversions
- static char setGlobalOptions(XMLCharEncoding characterEncoding = XMLNode::char_encoding_UTF8, char guessWideCharChars = 1,
+ static char setGlobalOptions(XMLCharEncoding characterEncoding = XMLNode::char_encoding_UTF8, char guessWideCharChars = 1,
char dropWhiteSpace = 1, char removeCommentsInMiddleOfText = 1);
/**< The "setGlobalOptions" function allows you to change four global parameters that affect string & file
* parsing. First of all, you most-probably will never have to change these 3 global parameters.
@@ -488,7 +488,7 @@ public: *
* @param characterEncoding This parameter is only meaningful when compiling in char* mode (multibyte character mode).
* In wchar_t* (wide char mode), this parameter is ignored. This parameter should be one of the
- * three currently recognized encodings: XMLNode::encoding_UTF8, XMLNode::encoding_ascii,
+ * three currently recognized encodings: XMLNode::encoding_UTF8, XMLNode::encoding_ascii,
* XMLNode::encoding_ShiftJIS.
*
* @param dropWhiteSpace In most situations, text fields containing only white spaces (and carriage returns)
|