diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_packet.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_form.cpp | 43 | ||||
-rw-r--r-- | protocols/Xfire/src/clanbuddylistnamespacket.cpp | 12 | ||||
-rw-r--r-- | protocols/Xfire/src/friendsoffriendlist.cpp | 4 |
4 files changed, 29 insertions, 34 deletions
diff --git a/protocols/IcqOscarJ/src/icq_packet.cpp b/protocols/IcqOscarJ/src/icq_packet.cpp index 0211b9528a..3bb6d024ed 100644 --- a/protocols/IcqOscarJ/src/icq_packet.cpp +++ b/protocols/IcqOscarJ/src/icq_packet.cpp @@ -634,6 +634,7 @@ void ppackTLVBlockItem(PBYTE *buf, size_t *buflen, WORD wType, PBYTE *pItem, WOR packWord(*buf + *buflen + 6, *wLength);
memcpy(*buf + *buflen + 8, *pItem, *wLength);
*buflen += 8 + *wLength;
+ *wLength = 0;
}
else {
*buf = (PBYTE)SAFE_REALLOC(*buf, 6 + *buflen);
@@ -644,7 +645,6 @@ void ppackTLVBlockItem(PBYTE *buf, size_t *buflen, WORD wType, PBYTE *pItem, WOR }
SAFE_FREE((void**)pItem);
- *wLength = 0;
}
@@ -653,7 +653,7 @@ void __fastcall unpackByte(BYTE **pSource, BYTE *byDestination) if (byDestination)
*byDestination = *(*pSource)++;
else
- *pSource += 1;
+ (*pSource)++;
}
void __fastcall unpackWord(BYTE **pSource, WORD *wDestination)
diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp index 7afa2152b4..45a71c3210 100644 --- a/protocols/JabberG/src/jabber_form.cpp +++ b/protocols/JabberG/src/jabber_form.cpp @@ -718,25 +718,23 @@ static INT_PTR CALLBACK JabberFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, switch (msg) {
case WM_INITDIALOG:
- {
- HXML n;
- LONG frameExStyle;
-
// lParam is (JABBER_FORM_INFO *)
TranslateDialogDefault(hwndDlg);
ShowWindow(GetDlgItem(hwndDlg, IDC_FRAME_TEXT), SW_HIDE);
jfi = (JABBER_FORM_INFO*)lParam;
if (jfi != NULL) {
+ HXML n;
+ LONG frameExStyle;
// Set dialog title
- if (jfi->xNode != NULL && (n = xmlGetChild(jfi->xNode , "title")) != NULL && xmlGetText(n) != NULL)
+ if (jfi->xNode != NULL && (n = xmlGetChild(jfi->xNode , _T("title"))) != NULL && xmlGetText(n) != NULL)
SetWindowText(hwndDlg, xmlGetText(n));
else if (jfi->defTitle != NULL)
SetWindowText(hwndDlg, TranslateTS(jfi->defTitle));
// Set instruction field
- if (jfi->xNode != NULL && (n = xmlGetChild(jfi->xNode , "instructions")) != NULL && xmlGetText(n) != NULL)
+ if (jfi->xNode != NULL && (n = xmlGetChild(jfi->xNode , _T("instructions"))) != NULL && xmlGetText(n) != NULL)
JabberFormSetInstruction(hwndDlg, xmlGetText(n));
else {
- if (jfi->xNode != NULL && (n = xmlGetChild(jfi->xNode, "title")) != NULL && xmlGetText(n) != NULL)
+ if (jfi->xNode != NULL && (n = xmlGetChild(jfi->xNode, _T("title"))) != NULL && xmlGetText(n) != NULL)
JabberFormSetInstruction(hwndDlg, xmlGetText(n));
else if (jfi->defTitle != NULL)
JabberFormSetInstruction(hwndDlg, TranslateTS(jfi->defTitle));
@@ -752,26 +750,23 @@ static INT_PTR CALLBACK JabberFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, jfi->frameHeight = rect.bottom - rect.top;
JabberFormCreateUI(GetDlgItem(hwndDlg, IDC_FRAME), jfi->xNode, &(jfi->formHeight));
}
- }
-
- if (jfi->formHeight > jfi->frameHeight) {
- HWND hwndScroll;
- hwndScroll = GetDlgItem(hwndDlg, IDC_VSCROLL);
- EnableWindow(hwndScroll, TRUE);
- SetScrollRange(hwndScroll, SB_CTL, 0, jfi->formHeight - jfi->frameHeight, FALSE);
- jfi->curPos = 0;
- }
+ if (jfi->formHeight > jfi->frameHeight) {
+ HWND hwndScroll = GetDlgItem(hwndDlg, IDC_VSCROLL);
+ EnableWindow(hwndScroll, TRUE);
+ SetScrollRange(hwndScroll, SB_CTL, 0, jfi->formHeight - jfi->frameHeight, FALSE);
+ jfi->curPos = 0;
+ }
- // Enable WS_EX_CONTROLPARENT on IDC_FRAME (so tab stop goes through all its children)
- frameExStyle = GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_FRAME), GWL_EXSTYLE);
- frameExStyle |= WS_EX_CONTROLPARENT;
- SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_FRAME), GWL_EXSTYLE, frameExStyle);
+ // Enable WS_EX_CONTROLPARENT on IDC_FRAME (so tab stop goes through all its children)
+ frameExStyle = GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_FRAME), GWL_EXSTYLE);
+ frameExStyle |= WS_EX_CONTROLPARENT;
+ SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_FRAME), GWL_EXSTYLE, frameExStyle);
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) jfi);
- if (jfi->pfnSubmit != NULL)
- EnableWindow(GetDlgItem(hwndDlg, IDC_SUBMIT), TRUE);
- }
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) jfi);
+ if (jfi->pfnSubmit != NULL)
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SUBMIT), TRUE);
+ }
return TRUE;
case WM_CTLCOLORSTATIC:
diff --git a/protocols/Xfire/src/clanbuddylistnamespacket.cpp b/protocols/Xfire/src/clanbuddylistnamespacket.cpp index 2a1b4c77a6..76269a01cf 100644 --- a/protocols/Xfire/src/clanbuddylistnamespacket.cpp +++ b/protocols/Xfire/src/clanbuddylistnamespacket.cpp @@ -51,7 +51,7 @@ namespace xfirelib { VariableValue friends; - XDEBUG2( "Len: %ld\n", length ); + XDEBUG2( "Len: %d\n", length ); index+=2; //paar bytes überspringen @@ -66,7 +66,7 @@ namespace xfirelib { int numberOfIds = friends.getValueAsLong(); - XDEBUG2( "numberofId: %ld\n", numberOfIds ); + XDEBUG2( "numberofId: %d\n", numberOfIds ); for(int i = 0 ; i < numberOfIds ; i++) { index += friends.readValue(buf,index,4); @@ -74,13 +74,13 @@ namespace xfirelib { XDEBUG3( "UserID: %ld %ld\n",i+1, friends.getValueAsLong() ); } - XDEBUG2( "NextByte: %ld\n",buf[index] ); - XDEBUG2( "NextByte: %ld\n",buf[index+1] ); + XDEBUG2( "NextByte: %c\n",buf[index] ); + XDEBUG2( "NextByte: %c\n",buf[index+1] ); index+=3; //nächsten 3 skippen - XDEBUG2( "NextByte: %ld\n",buf[index] ); - XDEBUG2( "NextByte: %ld\n",buf[index+1] ); + XDEBUG2( "NextByte: %c\n",buf[index] ); + XDEBUG2( "NextByte: %c\n",buf[index+1] ); usernames = new vector<string>; index = readStrings(usernames,buf,index); diff --git a/protocols/Xfire/src/friendsoffriendlist.cpp b/protocols/Xfire/src/friendsoffriendlist.cpp index bb2c4f884f..c2c5fa5c70 100644 --- a/protocols/Xfire/src/friendsoffriendlist.cpp +++ b/protocols/Xfire/src/friendsoffriendlist.cpp @@ -50,12 +50,12 @@ namespace xfirelib { VariableValue friends; - XDEBUG2( "Len: %ld\n", length ); + XDEBUG2( "Len: %d\n", length ); index+=8; //paar bytes überspringen int numberOfIds = (unsigned char)buf[index]; - XDEBUG2( "numberofId: %ld\n", numberOfIds ); + XDEBUG2( "numberofId: %d\n", numberOfIds ); index++; index++;//ignore 00 sids = new vector<char *>; |