updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / mutella / mutella-0.4.5.diff
blob831fd4095069e1fd07727b80c2528ae8c48c8072
1 diff -Naur mutella-0.4.5~/mutella/uiremote.cpp mutella-0.4.5/mutella/uiremote.cpp
2 --- mutella-0.4.5~/mutella/uiremote.cpp 2009-08-03 13:27:43.000000000 -0500
3 +++ mutella-0.4.5/mutella/uiremote.cpp 2009-08-03 13:28:07.000000000 -0500
4 @@ -575,11 +575,11 @@
6 // login -- HTTP-Basic so far
7 bool bLoginOK = false;
8 - char * pszAuth = NULL;
9 + const char * pszAuth = NULL;
10 if ( (pszAuth = strstr(szHandshake, "Authorization:")) )
12 // extract authorization line
13 - char * pRN = strstr(pszAuth, "\r\n");
14 + const char * pRN = strstr(pszAuth, "\r\n");
15 CString sAuthLine(pszAuth + strlen("Authorization:"), pRN-pszAuth-strlen("Authorization:"));
16 int nPos = sAuthLine.find("Basic");
17 if (nPos>=0)
18 @@ -616,7 +616,7 @@
19 const char* pszCookie;
20 if( (pszCookie = strstr(szHandshake, "Cookie:")) )
22 - char * pRN = strstr(pszCookie, "\r\n");
23 + const char * pRN = strstr(pszCookie, "\r\n");
24 CString sCookieLine(pszCookie + strlen("Cookie:"), pRN-pszCookie-strlen("Cookie:"));
25 // we will split the line by "; " combination
26 list<CString> Cookies;
27 diff -Naur mutella-0.4.5~/mutella/uiterminal.cpp mutella-0.4.5/mutella/uiterminal.cpp
28 --- mutella-0.4.5~/mutella/uiterminal.cpp 2009-08-03 13:27:43.000000000 -0500
29 +++ mutella-0.4.5/mutella/uiterminal.cpp 2009-08-03 13:27:59.000000000 -0500
30 @@ -251,7 +251,7 @@
31 ASSERT(m_pMaster);
32 ASSERT(m_pController);
33 // parse the string to isolate the last word
34 - if (part[part.size()-1]==' ')
35 + if (part.size() && part[part.size()-1]==' ')
36 return false; // sort of quick workaround for situation like command<SPACE>
37 CString s = StripWhite(part);
38 int nPos = s.rfind(" ");
39 diff -Naur mutella-0.4.5~/mutella/common.h mutella-0.4.5/mutella/common.h
40 --- mutella-0.4.5~/mutella/common.h 2009-08-03 13:27:43.000000000 -0500
41 +++ mutella-0.4.5/mutella/common.h 2009-08-03 13:27:59.000000000 -0500
42 @@ -50,7 +50,7 @@
43 bool QueryMatch(CString Result, const CString& Query);
44 // fast functions which do not copy the string
45 void MakeWordList(LPSTR szQuery, vector<char*>& QWords);
46 -void MakeWordList(LPSTR szQuery, vector<char*>& QWords, vector<char*>& QWords);
47 +void MakeWordList(LPSTR szQuery, vector<char*>& QWords, vector<char*>& QWords2);
48 bool MatchWordList(const CString& ResultLower, const vector<char*>& QWords, bool bMatchAll = true);
50 // slower but 'storage-independent' versions
51 diff -Naur mutella-0.4.5~/mutella/gnushare.h mutella-0.4.5/mutella/gnushare.h
52 --- mutella-0.4.5~/mutella/gnushare.h 2009-08-03 13:27:43.000000000 -0500
53 +++ mutella-0.4.5/mutella/gnushare.h 2009-08-03 13:27:59.000000000 -0500
54 @@ -26,6 +26,7 @@
55 #include "mthread.h"
57 class MGnuDirector;
58 +class MShareThread;
60 class MGnuShare
62 diff -Naur mutella-0.4.5~/mutella/mutella.h mutella-0.4.5/mutella/mutella.h
63 --- mutella-0.4.5~/mutella/mutella.h 2009-08-03 13:27:43.000000000 -0500
64 +++ mutella-0.4.5/mutella/mutella.h 2009-08-03 13:27:59.000000000 -0500
65 @@ -45,6 +45,7 @@
66 #include <memory>
67 #include <vector>
68 #include <string>
69 +#include <cstring>
70 #include <list>
72 #ifdef HAVE_LIMITS
73 diff -Naur mutella-0.4.5~/mutella/tstring.h mutella-0.4.5/mutella/tstring.h
74 --- mutella-0.4.5~/mutella/tstring.h 2009-08-03 13:27:43.000000000 -0500
75 +++ mutella-0.4.5/mutella/tstring.h 2009-08-03 13:27:59.000000000 -0500
76 @@ -23,6 +23,7 @@
78 #include <stdarg.h>
79 #include <iostream>
80 +#include <climits>
82 #ifdef TSTRING_DEBUG
84 @@ -450,6 +451,7 @@
85 ASSERT(m_pBuffer);
88 +public:
89 void _reallocNtail(int nAdd, LPCT pTail = NULL){
90 #ifdef CHECK_RANGE
91 if ( nAdd < 0 )
92 @@ -499,6 +501,7 @@
94 m_pBuffer[m_nLength] = _null;
96 +protected:
97 /* void _reallocNtail(int nAdd, LPCT pTail = NULL){
98 #ifdef CHECK_RANGE
99 if ( nAdd < 0 )
100 @@ -597,15 +600,19 @@
101 static int _strchr(LPCT stack, T needle); // same as above
102 static int _strrstr(LPCT stack, LPCT needle);
103 static int _strrchr(LPCT stack, T needle);
104 +public:
105 static int _strcmp(LPCT left, LPCT right); // returns -1, 0 or 1
106 +protected:
107 static void _makelower(LPT str, int len);
108 static void _makeupper(LPT str, int len);
109 static int _vsnprintf(LPT str, int size, const char *format, va_list ap);
110 static T _null;
111 +public:
112 // data
113 T* m_pBuffer;
114 int m_nBufferSize;
115 int m_nLength;
116 +protected:
117 // friends
118 friend bool operator== <>(const TString<T>& lhs, const TString<T>& rhs);
119 friend bool operator== <>(const TString<T>& lhs, typename TString<T>::LPCT pszRhs);