[boinc] 01/01: dropped some unapplied patches

Guo Yixuan yixuan-guest at moszumanska.debian.org
Tue May 27 14:18:06 UTC 2014


This is an automated email from the git hooks/post-receive script.

yixuan-guest pushed a commit to branch master
in repository boinc.

commit 04125a2c8a11ee903eaf3bd51ca2cbf76dd6fe6f
Author: Guo Yixuan <culu.gyx at gmail.com>
Date:   Tue May 27 10:15:23 2014 -0400

    dropped some unapplied patches
    
    These are mainly used for debugging or suppressing the
    warnings. It's not meanful to maintain them anymore.
---
 ...dSomeConstToMakeClearMemoryIsNotAllocated.patch |  751 ------
 debian/patches/AddingMoreConst.patch               | 2816 --------------------
 debian/patches/andYetMorePatches04.patch           | 1191 ---------
 debian/patches/annoying_warning_const_image.patch  |   36 -
 debian/patches/evenMoreConst03.patch               |  336 ---
 debian/patches/series                              |    4 -
 6 files changed, 5134 deletions(-)

diff --git a/debian/patches/AddSomeConstToMakeClearMemoryIsNotAllocated.patch b/debian/patches/AddSomeConstToMakeClearMemoryIsNotAllocated.patch
deleted file mode 100644
index 15ab6cd..0000000
--- a/debian/patches/AddSomeConstToMakeClearMemoryIsNotAllocated.patch
+++ /dev/null
@@ -1,751 +0,0 @@
-Author: Steffen Moeller <moeller at debian.org>
-Description: Introduction of "const" flag. This patch is not applied.
-Index: boinc/clientgui/ProjectListCtrl.cpp
-===================================================================
---- boinc.orig/clientgui/ProjectListCtrl.cpp	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ProjectListCtrl.cpp	2011-11-13 23:34:52.000000000 +0100
-@@ -60,7 +60,7 @@
- #endif
- 
- // Gets the name of the specified object.
--wxAccStatus CProjectListCtrlAccessible::GetName(int childId, wxString* name)
-+wxAccStatus CProjectListCtrlAccessible::GetName(int childId, wxString* const name) const
- {
-     if (childId == wxACC_SELF)
-     {
-@@ -80,7 +80,7 @@
- 
- // Can return either a child object, or an integer
- // representing the child element, starting from 1.
--wxAccStatus CProjectListCtrlAccessible::HitTest(const wxPoint& pt, int* childId, wxAccessible** /*childObject*/)
-+wxAccStatus CProjectListCtrlAccessible::HitTest(const wxPoint& pt, int* childId, wxAccessible** const /*childObject*/)
- {
-     CProjectListCtrl* pCtrl = wxDynamicCast(GetWindow(), CProjectListCtrl);
-     if (pCtrl)
-@@ -94,7 +94,7 @@
- 
- 
- // Returns the rectangle for this object (id = 0) or a child element (id > 0).
--wxAccStatus CProjectListCtrlAccessible::GetLocation(wxRect& rect, int elementId)
-+wxAccStatus CProjectListCtrlAccessible::GetLocation(wxRect& rect, int elementId) const
- {
-     CProjectListCtrl* pCtrl = wxDynamicCast(GetWindow(), CProjectListCtrl);
-     if (pCtrl && (0 == elementId))
-@@ -132,7 +132,7 @@
- 
- 
- // Gets the number of children.
--wxAccStatus CProjectListCtrlAccessible::GetChildCount(int* childCount)
-+wxAccStatus CProjectListCtrlAccessible::GetChildCount(int* const childCount) const
- {
-     CProjectListCtrl* pCtrl = wxDynamicCast(GetWindow(), CProjectListCtrl);
-     if (pCtrl)
-@@ -182,7 +182,7 @@
- 
- 
- // Returns the description for this object or a child.
--wxAccStatus CProjectListCtrlAccessible::GetDescription(int childId, wxString* description)
-+wxAccStatus CProjectListCtrlAccessible::GetDescription(int childId, wxString* const description) const
- {
-     CProjectListCtrl* pCtrl = wxDynamicCast(GetWindow(), CProjectListCtrl);
-     if (pCtrl && (childId != wxACC_SELF))
-@@ -275,7 +275,7 @@
- // The retrieved string describes the action that is performed on an object,
- // not what the object does as a result. For example, a toolbar button that prints
- // a document has a default action of "Press" rather than "Prints the current document."
--wxAccStatus CProjectListCtrlAccessible::GetDefaultAction(int childId, wxString* actionName)
-+wxAccStatus CProjectListCtrlAccessible::GetDefaultAction(int childId, wxString* const actionName) const
- {
-     CProjectListCtrl* pCtrl = wxDynamicCast(GetWindow(), CProjectListCtrl);
-     if (pCtrl && (childId != wxACC_SELF))
-@@ -289,7 +289,7 @@
- 
- 
- // Returns a role constant.
--wxAccStatus CProjectListCtrlAccessible::GetRole(int childId, wxAccRole* role)
-+wxAccStatus CProjectListCtrlAccessible::GetRole(int childId, wxAccRole* const role) const
- {
-     if (childId == wxACC_SELF)
-     {
-@@ -304,7 +304,7 @@
- 
- 
- // Returns a role constant.
--wxAccStatus CProjectListCtrlAccessible::GetState(int childId, long* state)
-+wxAccStatus CProjectListCtrlAccessible::GetState(int childId, long* const state) const
- {
-     if (childId == wxACC_SELF)
-     {
-@@ -575,14 +575,14 @@
-  */
-  
- bool CProjectListCtrl::Append(
--    wxString strURL,
--    wxString strTitle,
--    wxString strImage,
--    wxString strDescription,
--    bool bNvidiaGPUSupported,
--    bool bATIGPUSupported,
--    bool bMulticoreSupported,
--    bool bSupported
-+    const wxString strURL,
-+    const wxString strTitle,
-+    const wxString strImage,
-+    const wxString strDescription,
-+    const bool bNvidiaGPUSupported,
-+    const bool bATIGPUSupported,
-+    const bool bMulticoreSupported,
-+    const bool bSupported
- )
- {
-     CProjectListItem* pItem = new CProjectListItem();
-Index: boinc/clientgui/ProjectListCtrl.h
-===================================================================
---- boinc.orig/clientgui/ProjectListCtrl.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ProjectListCtrl.h	2011-11-13 23:24:19.000000000 +0100
-@@ -33,34 +33,34 @@
- public:
- 
-     wxString GetURL() const { return m_strURL ; }
--    void SetURL(wxString value) { m_strURL = value ; }
-+    void SetURL(const wxString value) { m_strURL = value ; }
- 
-     wxString GetTitle() const { return m_strTitle ; }
--    void SetTitle(wxString value) { m_strTitle = value ; }
-+    void SetTitle(const wxString value) { m_strTitle = value ; }
- 
-     wxString GetImage() const { return m_strImage ; }
--    void SetImage(wxString value) { m_strImage = value ; }
-+    void SetImage(const wxString value) { m_strImage = value ; }
- 
-     wxString GetOrganization() const { return m_strOrganization ; }
--    void SetOrganization(wxString value) { m_strOrganization = value ; }
-+    void SetOrganization(const wxString value) { m_strOrganization = value ; }
- 
-     wxString GetDescription() const { return m_strDescription ; }
--    void SetDescription(wxString value) { m_strDescription = value ; }
-+    void SetDescription(const wxString value) { m_strDescription = value ; }
- 
-     wxString GetCategory() const { return m_strCategory ; }
--    void SetCategory(wxString value) { m_strCategory = value ; }
-+    void SetCategory(const wxString value) { m_strCategory = value ; }
- 
-     bool IsNvidiaGPUSupported() const { return m_bNvidiaGPUSupported ; }
--    void SetNvidiaGPUSupported(bool value) { m_bNvidiaGPUSupported = value ; }
-+    void SetNvidiaGPUSupported(const bool value) { m_bNvidiaGPUSupported = value ; }
- 
-     bool IsATIGPUSupported() const { return m_bATIGPUSupported ; }
--    void SetATIGPUSupported(bool value) { m_bATIGPUSupported = value ; }
-+    void SetATIGPUSupported(const bool value) { m_bATIGPUSupported = value ; }
- 
-     bool IsMulticoreSupported() const { return m_bMulticoreSupported ; }
--    void SetMulticoreSupported(bool value) { m_bMulticoreSupported = value ; }
-+    void SetMulticoreSupported(const bool value) { m_bMulticoreSupported = value ; }
- 
-     bool IsPlatformSupported() const { return m_bSupported ; }
--    void SetPlatformSupported(bool value) { m_bSupported = value ; }
-+    void SetPlatformSupported(const bool value) { m_bSupported = value ; }
- 
- private:
-     wxString m_strURL;
-@@ -100,19 +100,19 @@
-     CProjectListCtrlAccessible(wxWindow* win): wxWindowAccessible(win) {}
- #endif
- 
--    virtual wxAccStatus GetName(int childId, wxString* name);
--    virtual wxAccStatus HitTest(const wxPoint& pt, int* childId, wxAccessible** childObject);
--    virtual wxAccStatus GetLocation(wxRect& rect, int elementId);
--    virtual wxAccStatus GetChildCount(int* childCount);
-+    virtual wxAccStatus GetName(int childId, wxString* const name) const;
-+    virtual wxAccStatus HitTest(const wxPoint& pt, int* childId, wxAccessible** const childObject);
-+    virtual wxAccStatus GetLocation(wxRect& rect, int elementId) const;
-+    virtual wxAccStatus GetChildCount(int* const childCount) const;
-     virtual wxAccStatus DoDefaultAction(int childId);
--    virtual wxAccStatus GetDescription(int childId, wxString* description);
-+    virtual wxAccStatus GetDescription(int childId, wxString* const description);
- #ifndef __WXMAC__
--    virtual wxAccStatus Navigate(wxNavDir navDir, int fromId, int* toId, wxAccessible** toObject);
--    virtual wxAccStatus GetDefaultAction(int childId, wxString* actionName);
--    virtual wxAccStatus GetRole(int childId, wxAccRole* role);
--    virtual wxAccStatus GetState(int childId, long* state);
--    virtual wxAccStatus Select(int childId, wxAccSelectionFlags selectFlags);
--    virtual wxAccStatus GetSelections(wxVariant* selections);
-+    virtual wxAccStatus Navigate(wxNavDir navDir, int fromId, int* toId, wxAccessible** const toObject);
-+    virtual wxAccStatus GetDefaultAction(int childId, wxString* const actionName);
-+    virtual wxAccStatus GetRole(int childId, wxAccRole* const role) const;
-+    virtual wxAccStatus GetState(int childId, long* const state) const;
-+    virtual wxAccStatus Select(int childId, wxAccSelectionFlags selectFlags) const;
-+    virtual wxAccStatus GetSelections(wxVariant* const selections) const;
- #endif
- 
- #ifdef __WXMAC__
-@@ -166,14 +166,14 @@
- 
-     /// Methods
-     bool Append(
--        wxString strURL,
--        wxString strTitle,
--        wxString strImage,
--        wxString strDescription,
--        bool bNvidiaGPUSupported,
--        bool bATIGPUSupported,
--        bool bMulticoreSupported,
--        bool bSupported
-+        const wxString strURL,
-+        const wxString strTitle,
-+        const wxString strImage,
-+        const wxString strDescription,
-+        const bool bNvidiaGPUSupported,
-+        const bool bATIGPUSupported,
-+        const bool bMulticoreSupported,
-+        const bool bSupported
-     );
- 
-     CProjectListItem* GetItem( 
-@@ -204,9 +204,9 @@
-         m_bSupported = bSupported;
-     } 
- 
--    wxString GetName() { return m_strName; };
--    wxString GetURL() { return m_strURL; };
--    bool IsSupported() { return m_bSupported; };
-+    wxString GetName() const { return m_strName; };
-+    wxString GetURL() const { return m_strURL; };
-+    bool IsSupported() const { return m_bSupported; };
- 
-     virtual wxNotifyEvent* Clone() const { return new ProjectListCtrlEvent(*this); }
- 
-Index: boinc/clientgui/DlgSelectComputer.cpp
-===================================================================
---- boinc.orig/clientgui/DlgSelectComputer.cpp	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/DlgSelectComputer.cpp	2011-11-13 23:45:15.000000000 +0100
-@@ -65,7 +65,7 @@
- {
- }
- 
--CDlgSelectComputer::CDlgSelectComputer( wxWindow* parent, bool required, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
-+CDlgSelectComputer::CDlgSelectComputer( wxWindow* parent, const bool required, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
- {
-     Create(parent, required, id, caption, pos, size, style);
- }
-@@ -74,7 +74,7 @@
-  * CDlgSelectComputer creator
-  */
- 
--bool CDlgSelectComputer::Create( wxWindow* parent, bool required, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
-+bool CDlgSelectComputer::Create( wxWindow* parent, const bool required, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
- {
- ////@begin CDlgSelectComputer member initialisation
-     m_ComputerNameCtrl = NULL;
-@@ -106,7 +106,7 @@
-  * Control creation for CDlgSelectComputer
-  */
- 
--void CDlgSelectComputer::CreateControls(bool required)
-+void CDlgSelectComputer::CreateControls(const bool required)
- {    
- ////@begin CDlgSelectComputer content construction
-     CDlgSelectComputer* itemDialog1 = this;
-Index: boinc/clientgui/DlgSelectComputer.h
-===================================================================
---- boinc.orig/clientgui/DlgSelectComputer.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/DlgSelectComputer.h	2011-11-13 23:43:14.000000000 +0100
-@@ -75,13 +75,13 @@
- public:
-     /// Constructors
-     CDlgSelectComputer( );
--    CDlgSelectComputer( wxWindow* parent, bool required = false, wxWindowID id = SYMBOL_CDLGSELECTCOMPUTER_IDNAME, const wxString& caption = SYMBOL_CDLGSELECTCOMPUTER_TITLE, const wxPoint& pos = SYMBOL_CDLGSELECTCOMPUTER_POSITION, const wxSize& size = SYMBOL_CDLGSELECTCOMPUTER_SIZE, long style = SYMBOL_CDLGSELECTCOMPUTER_STYLE );
-+    CDlgSelectComputer( wxWindow* parent, const bool required = false, wxWindowID id = SYMBOL_CDLGSELECTCOMPUTER_IDNAME, const wxString& caption = SYMBOL_CDLGSELECTCOMPUTER_TITLE, const wxPoint& pos = SYMBOL_CDLGSELECTCOMPUTER_POSITION, const wxSize& size = SYMBOL_CDLGSELECTCOMPUTER_SIZE, long style = SYMBOL_CDLGSELECTCOMPUTER_STYLE );
- 
-     /// Creation
--    bool Create( wxWindow* parent, bool required = false, wxWindowID id = SYMBOL_CDLGSELECTCOMPUTER_IDNAME, const wxString& caption = SYMBOL_CDLGSELECTCOMPUTER_TITLE, const wxPoint& pos = SYMBOL_CDLGSELECTCOMPUTER_POSITION, const wxSize& size = SYMBOL_CDLGSELECTCOMPUTER_SIZE, long style = SYMBOL_CDLGSELECTCOMPUTER_STYLE );
-+    bool Create( wxWindow* parent, const bool required = false, wxWindowID id = SYMBOL_CDLGSELECTCOMPUTER_IDNAME, const wxString& caption = SYMBOL_CDLGSELECTCOMPUTER_TITLE, const wxPoint& pos = SYMBOL_CDLGSELECTCOMPUTER_POSITION, const wxSize& size = SYMBOL_CDLGSELECTCOMPUTER_SIZE, long style = SYMBOL_CDLGSELECTCOMPUTER_STYLE );
- 
-     /// Creates the controls and sizers
--    void CreateControls(bool required);
-+    void CreateControls(const bool required);
- 
- ////@begin CDlgSelectComputer event handler declarations
- 
-@@ -93,10 +93,10 @@
- ////@begin CDlgSelectComputer member function declarations
- 
-     wxString GetComputerName() const { return m_strComputerName ; }
--    void SetComputerName(wxString value) { m_strComputerName = value ; }
-+    void SetComputerName(const wxString value) { m_strComputerName = value ; }
- 
-     wxString GetComputerPassword() const { return m_strComputerPassword ; }
--    void SetComputerPassword(wxString value) { m_strComputerPassword = value ; }
-+    void SetComputerPassword(const wxString value) { m_strComputerPassword = value ; }
- 
-     /// Retrieves bitmap resources
-     wxBitmap GetBitmapResource( const wxString& name );
-Index: boinc/clientgui/MainDocument.cpp
-===================================================================
---- boinc.orig/clientgui/MainDocument.cpp	2011-11-13 23:58:43.000000000 +0100
-+++ boinc/clientgui/MainDocument.cpp	2011-11-14 01:05:10.000000000 +0100
-@@ -92,7 +92,7 @@
- 
- using std::string;
- 
--CNetworkConnection::CNetworkConnection(CMainDocument* pDocument) :
-+CNetworkConnection::CNetworkConnection(CMainDocument* const pDocument) :
-     wxObject() {
-     m_pDocument = pDocument;
- 
-@@ -117,14 +117,19 @@
- }
- 
- 
--int CNetworkConnection::GetLocalPassword(wxString& strPassword){
-+int CNetworkConnection::GetLocalPassword(wxString& strPassword) const {
-     char buf[256];
-     strcpy(buf, "");
- 
-     FILE* f = fopen("gui_rpc_auth.cfg", "r");
-     if (!f) return errno;
--    fgets(buf, 256, f);
-+    char *s = fgets(buf, 256, f);
-     fclose(f);
-+    if ((char *) NULL == s) {
-+        if (errno) return errno;
-+	return EAGAIN;
-+    }
-+
-     int n = (int)strlen(buf);
-     if (n) {
-         n--;
-@@ -228,25 +233,25 @@
-     return 0;
- }
- 
--int CNetworkConnection::GetConnectedComputerName(wxString& strMachine) {
-+int CNetworkConnection::GetConnectedComputerName(wxString& strMachine) const {
-     strMachine = m_strConnectedComputerName;
-     return 0;
- }
- 
- 
--int CNetworkConnection::GetConnectedComputerVersion(wxString& strVersion) {
-+int CNetworkConnection::GetConnectedComputerVersion(wxString& strVersion) const {
-     strVersion = m_strConnectedComputerVersion;
-     return 0;
- }
- 
- 
--int CNetworkConnection::GetConnectingComputerName(wxString& strMachine) {
-+int CNetworkConnection::GetConnectingComputerName(wxString& strMachine) const {
-     strMachine = m_strNewComputerName;
-     return 0;
- }
- 
- 
--bool CNetworkConnection::IsComputerNameLocal(const wxString& strMachine) {
-+bool CNetworkConnection::IsComputerNameLocal(const wxString& strMachine) const {
-     static wxString strHostName = wxEmptyString;
-     static wxString strFullHostName = wxEmptyString;
- 
-@@ -336,7 +341,7 @@
- }
- 
- 
--void CNetworkConnection::SetStateSuccess(wxString& strComputer, wxString& strComputerPassword) {
-+void CNetworkConnection::SetStateSuccess(const wxString& strComputer, const wxString& strComputerPassword) {
-     CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
-     if (pFrame && !m_bFrameShutdownDetected) {
-         wxASSERT(wxDynamicCast(pFrame, CBOINCBaseFrame));
-@@ -671,35 +676,35 @@
- }
- 
- 
--int CMainDocument::GetConnectedComputerName(wxString& strMachine) {
-+int CMainDocument::GetConnectedComputerName(wxString& strMachine) const {
-     m_pNetworkConnection->GetConnectedComputerName(strMachine);
-     return 0;
- }
- 
- 
--int CMainDocument::GetConnectedComputerVersion(wxString& strVersion) {
-+int CMainDocument::GetConnectedComputerVersion(wxString& strVersion) const {
-     m_pNetworkConnection->GetConnectedComputerVersion(strVersion);
-     return 0;
- }
- 
- 
--int CMainDocument::GetConnectingComputerName(wxString& strMachine) {
-+int CMainDocument::GetConnectingComputerName(wxString& strMachine) const {
-     m_pNetworkConnection->GetConnectingComputerName(strMachine);
-     return 0;
- }
- 
- 
--bool CMainDocument::IsComputerNameLocal(const wxString strMachine) {
-+bool CMainDocument::IsComputerNameLocal(const wxString strMachine) const {
-     return m_pNetworkConnection->IsComputerNameLocal(strMachine);
- }
- 
- 
--bool CMainDocument::IsConnected() {
-+bool CMainDocument::IsConnected() const {
-     return m_pNetworkConnection->IsConnected();
- }
- 
- 
--bool CMainDocument::IsReconnecting() {
-+bool CMainDocument::IsReconnecting() const {
-     return m_pNetworkConnection->IsReconnecting();
- }
- 
-@@ -1312,7 +1317,7 @@
- }
- 
- 
--int CMainDocument::GetProjectCount() {
-+int CMainDocument::GetProjectCount() /* not const */ {
-     int iCount = -1;
- 
-     CachedProjectStatusUpdate();
-@@ -1484,7 +1489,7 @@
-     return pResult;
- }
- 
--int CMainDocument::GetWorkCount() {
-+int CMainDocument::GetWorkCount() /* not const */ {
-     int iCount = -1;
-     
-     CachedResultsStatusUpdate();
-@@ -1497,7 +1502,7 @@
- }
- 
- 
--int CMainDocument::WorkSuspend(char* url, char* name) {
-+int CMainDocument::WorkSuspend(const char* const url, const char* const name) {
-     int iRetVal = 0;
- 
-     RESULT* pStateResult = state.lookup_result(url, name);
-@@ -1511,7 +1516,7 @@
- }
- 
- 
--int CMainDocument::WorkResume(char* url, char* name) {
-+int CMainDocument::WorkResume(const char* const url, const char* const name) {
-     int iRetVal = 0;
- 
-     RESULT* pStateResult = state.lookup_result(url, name);
-@@ -1527,7 +1532,7 @@
- 
- // If the graphics application for the current task is already 
- // running, return a pointer to its RUNNING_GFX_APP struct.
--RUNNING_GFX_APP* CMainDocument::GetRunningGraphicsApp(RESULT* result, int slot)
-+RUNNING_GFX_APP* CMainDocument::GetRunningGraphicsApp(const RESULT* const result, int slot)
- {
-     bool exited = false;
-     std::vector<RUNNING_GFX_APP>::iterator gfx_app_iter;
-@@ -1758,7 +1763,7 @@
- }
- 
- 
--int CMainDocument::WorkAbort(char* url, char* name) {
-+int CMainDocument::WorkAbort(const char* const url, const char* const name) {
-     int iRetVal = 0;
- 
-     RESULT* pStateResult = state.lookup_result(url, name);
-@@ -1884,7 +1889,7 @@
- }
- 
- 
--int CMainDocument::GetUnreadNoticeCount() {
-+int CMainDocument::GetUnreadNoticeCount() const {
-     int iCount = 0;
-     if (!notices.notices.empty()) {
-         for (unsigned int i = 0; i < notices.notices.size(); i++) { 
-@@ -2311,7 +2316,7 @@
- }
- 
- 
--int CMainDocument::GetSimpleProjectCount() {
-+int CMainDocument::GetSimpleProjectCount() /* not const */ {
-     int iCount = -1;
- 
-     CachedSimpleGUIUpdate();
-@@ -2324,7 +2329,7 @@
- }
- 
- 
--int CMainDocument::GetSimpleGUIWorkCount() {
-+int CMainDocument::GetSimpleGUIWorkCount() /* not const */ {
-     int iCount = 0;
-     unsigned int i = 0;
- 
-@@ -2357,7 +2362,7 @@
-     return _("unknown reason");
- }
- 
--wxString result_description(RESULT* result, bool show_resources) {
-+wxString result_description(const RESULT* const result, bool show_resources) {
-     CMainDocument* doc = wxGetApp().GetDocument();
-     PROJECT* project;
-     CC_STATUS       status;
-Index: boinc/clientgui/MainDocument.h
-===================================================================
---- boinc.orig/clientgui/MainDocument.h	2011-07-24 19:39:09.000000000 +0200
-+++ boinc/clientgui/MainDocument.h	2011-11-14 01:21:54.000000000 +0100
-@@ -69,11 +69,11 @@
-     void           ForceDisconnect() { m_bForceReconnect = false; m_bReconnectOnError = false; m_bConnectEvent = false; SetStateDisconnected(); };
-     void           ForceReconnect() { m_bForceReconnect = true; SetStateDisconnected(); };
-     int            FrameShutdownDetected();
--    int            GetConnectedComputerName(wxString& strMachine);
--    int            GetConnectedComputerVersion(wxString& strVersion);
--    int            GetConnectingComputerName(wxString& strMachine);
--    bool           IsComputerNameLocal(const wxString& strMachine);
--    int            GetLocalPassword(wxString& strPassword);
-+    int            GetConnectedComputerName(wxString& strMachine) const;
-+    int            GetConnectedComputerVersion(wxString& strVersion) const;
-+    int            GetConnectingComputerName(wxString& strMachine) const;
-+    bool           IsComputerNameLocal(const wxString& strMachine) const;
-+    int            GetLocalPassword(wxString& strPassword) const;
-     int SetComputer(
-         const wxChar* szComputer, const int iPort, const wxChar* szPassword,
-         const bool bUseDefaultPassword
-@@ -81,7 +81,7 @@
-     void           SetStateError();
-     void           SetStateErrorAuthentication();
-     void           SetStateReconnecting();
--    void           SetStateSuccess(wxString& strComputer, wxString& strComputerPassword);
-+    void           SetStateSuccess(const wxString& strComputer, const wxString& strComputerPassword);
-     void           SetStateDisconnected();
-     bool           IsConnectEventSignaled() { return m_bConnectEvent; };
-     bool           IsConnected() { return m_bConnected; };
-@@ -149,14 +149,14 @@
-     int                         FrameShutdownDetected();
-     int                         CoreClientQuit();
- 
--    int                         GetConnectedComputerName(wxString& strMachine);
--    int                         GetConnectedComputerVersion(wxString& strVersion);
--    int                         GetConnectingComputerName(wxString& strMachine);
--    bool                        IsComputerNameLocal(const wxString strMachine);
--    bool                        IsConnected();
--    bool                        IsReconnecting();
-+    int                         GetConnectedComputerName(wxString& strMachine) const;
-+    int                         GetConnectedComputerVersion(wxString& strVersion) const;
-+    int                         GetConnectingComputerName(wxString& strMachine) const;
-+    bool                        IsComputerNameLocal(const wxString strMachine) const;
-+    bool                        IsConnected() const;
-+    bool                        IsReconnecting() const;
- 
--    int                         GetCoreClientStatus(CC_STATUS&, bool bForce = false);
-+    int                         GetCoreClientStatus(CC_STATUS&, bool bForce = false) /* not const */;
-     int                         SetActivityRunMode(int iMode, int iTimeout);
-     int                         SetGPURunMode(int iMode, int iTimeout);
-     int                         SetNetworkRunMode(int iMode, int iTimeout);
-@@ -227,7 +227,7 @@
- 	PROJECT* project(char* url);
-     float                       m_fProjectTotalResourceShare;
- 
--    int                         GetProjectCount();
-+    int                         GetProjectCount() /* not const */;
- 
-     int                         ProjectNoMoreWork(int iIndex);
-     int                         ProjectAllowMoreWork(int iIndex);
-@@ -247,7 +247,7 @@
-     double                      m_fResultsRPCExecutionTime;
-     wxDateTime                  m_dtKillInactiveGfxTimestamp;
-     std::vector<RUNNING_GFX_APP> m_running_gfx_apps;
--    RUNNING_GFX_APP*            GetRunningGraphicsApp(RESULT* result, int slot);
-+    RUNNING_GFX_APP*            GetRunningGraphicsApp(const RESULT* const result, int slot);
-     void                        KillAllRunningGraphicsApps();
-     void                        KillInactiveGraphicsApps();
- #ifdef _WIN32
-@@ -265,13 +265,13 @@
-     RESULT*                     result(unsigned int);
-     RESULT*                     result(const wxString& name, const wxString& project_url);
- 
--    int                         GetWorkCount();
-+    int                         GetWorkCount() /* not const */;
- 
--    int                         WorkSuspend(char* url, char* name);
--    int                         WorkResume(char* url, char* name);
--    int                         WorkShowGraphics(RESULT* result);
--    int                         WorkAbort(char* url, char* name);
--    CC_STATE*                   GetState() { return &state; };
-+    int                         WorkSuspend(const char* const url, const char* const name);
-+    int                         WorkResume(const char* const url, const char* const name);
-+    int                         WorkShowGraphics(RESULT* const result);
-+    int                         WorkAbort(const char* const url, const char* const name);
-+    CC_STATE*                   GetState() { return &state; } ;
- 
- 
-     //
-@@ -291,8 +291,8 @@
-     NOTICE*                     notice(unsigned int);
-     int                         CachedNoticeUpdate();
- 
--    int                         GetNoticeCount();
--    int                         GetUnreadNoticeCount();
-+    int                         GetNoticeCount() /* not const */;
-+    int                         GetUnreadNoticeCount() const;
- 
-     void                        SaveUnreadNoticeInfo();
-     void                        RestoreUnreadNoticeInfo();
-@@ -315,7 +315,7 @@
-     MESSAGE*                    message(unsigned int);
-     int                         CachedMessageUpdate();
- 
--    int                         GetMessageCount();
-+    int                         GetMessageCount() /* not const */;
- 
-     int                         ResetMessageState();
- 
-@@ -337,7 +337,7 @@
-     FILE_TRANSFER*              file_transfer(unsigned int);
-     FILE_TRANSFER*              file_transfer(const wxString& fileName, const wxString& project_url);
- 
--    int                         GetTransferCount();
-+    int                         GetTransferCount() /* not const */;
- 
-     int                         TransferRetryNow(int iIndex);
-     int                         TransferRetryNow(const wxString& fileName, const wxString& project_url);
-@@ -372,7 +372,7 @@
-     PROJECT*                    statistic(unsigned int);
-     int                         m_iGet_statistics_rpc_result;
- 
--    int                         GetStatisticsCount();
-+    int                         GetStatisticsCount() /* not const */;
- 	
- 
- 	//
-@@ -399,13 +399,13 @@
- public:
-     ACCT_MGR_INFO               ami;
-     ACCT_MGR_INFO               async_ami_buf;
--    int                         GetSimpleProjectCount();
--    int                         GetSimpleGUIWorkCount();
-+    int                         GetSimpleProjectCount() /* not const */;
-+    int                         GetSimpleGUIWorkCount() /* not const */;
- 
- };
- 
- extern wxString suspend_reason_wxstring(int reason);
--extern wxString result_description(RESULT*, bool show_resources=true);
-+extern wxString result_description(const RESULT *const, bool show_resources=true);
- extern wxString process_client_message(const char*);
- 
- #ifdef SANDBOX
-Index: boinc/clientgui/sg_TaskCommandPopup.cpp
-===================================================================
---- boinc.orig/clientgui/sg_TaskCommandPopup.cpp	2011-07-24 19:39:09.000000000 +0200
-+++ boinc/clientgui/sg_TaskCommandPopup.cpp	2011-11-14 01:08:13.000000000 +0100
-@@ -284,7 +284,7 @@
- 
- // CMainDocument::state.lookup_result() does not yield current scheduler_state; 
- // we must use CMainDocument::result() for that.
--RESULT* CSimpleTaskPopupButton::lookup_result(char* url, char* name) {
-+RESULT* CSimpleTaskPopupButton::lookup_result(const char* const url, const char* const name) {
-     CMainDocument* pDoc     = wxGetApp().GetDocument();
- 
-     wxASSERT(pDoc);
-Index: boinc/clientgui/sg_TaskCommandPopup.h
-===================================================================
---- boinc.orig/clientgui/sg_TaskCommandPopup.h	2011-07-24 19:39:09.000000000 +0200
-+++ boinc/clientgui/sg_TaskCommandPopup.h	2011-11-14 01:07:28.000000000 +0100
-@@ -44,7 +44,7 @@
-         void OnTaskSuspendResume(wxCommandEvent& event);
-         void OnTaskAbort(wxCommandEvent& event);
-         void OnTaskShowProperties(wxCommandEvent& event);
--        RESULT* lookup_result(char* url, char* name);
-+        RESULT* lookup_result(const char* const url, const char* const name);
-         
- 	protected:
-         wxMenu*                     m_TaskCommandPopUpMenu;
-Index: boinc/lib/gui_rpc_client.h
-===================================================================
---- boinc.orig/lib/gui_rpc_client.h	2011-10-30 00:27:06.000000000 +0200
-+++ boinc/lib/gui_rpc_client.h	2011-11-14 01:15:55.000000000 +0100
-@@ -385,13 +385,13 @@
-     CC_STATE();
-     ~CC_STATE();
- 
--    PROJECT* lookup_project(char* url);
--    APP* lookup_app(PROJECT*, char* name);
--    APP_VERSION* lookup_app_version(PROJECT*, APP*, int, char* plan_class);
--    APP_VERSION* lookup_app_version_old(PROJECT*, APP*, int);
--    WORKUNIT* lookup_wu(PROJECT*, char* name);
--    RESULT* lookup_result(PROJECT*, char* name);
--    RESULT* lookup_result(char* url, char* name);
-+    PROJECT* lookup_project(const char* const url);
-+    APP* lookup_app(const PROJECT* const, const char* const name);
-+    APP_VERSION* lookup_app_version(const PROJECT* const, const APP* const, int, const char* const plan_class);
-+    APP_VERSION* lookup_app_version_old(const PROJECT* const, const APP* const, int);
-+    WORKUNIT* lookup_wu(const PROJECT* const, const char* const name);
-+    RESULT* lookup_result(const PROJECT* const, const char* const name);
-+    RESULT* lookup_result(const char* const url, const char* const name);
- 
-     void print();
-     void clear();
-Index: boinc/lib/gui_rpc_client_ops.cpp
-===================================================================
---- boinc.orig/lib/gui_rpc_client_ops.cpp	2011-11-13 17:47:09.000000000 +0100
-+++ boinc/lib/gui_rpc_client_ops.cpp	2011-11-14 01:14:41.000000000 +0100
-@@ -908,7 +908,7 @@
-     have_ati = false;
- }
- 
--PROJECT* CC_STATE::lookup_project(char* url) {
-+PROJECT* CC_STATE::lookup_project(const char* const url) {
-     unsigned int i;
-     for (i=0; i<projects.size(); i++) {
-         if (!strcmp(projects[i]->master_url, url)) return projects[i];
-@@ -916,7 +916,7 @@
-     return 0;
- }
- 
--APP* CC_STATE::lookup_app(PROJECT* project, char* name) {
-+APP* CC_STATE::lookup_app(const PROJECT* const project, const char* const name) {
-     unsigned int i;
-     for (i=0; i<apps.size(); i++) {
-         if (apps[i]->project != project) continue;
-@@ -926,7 +926,7 @@
- }
- 
- APP_VERSION* CC_STATE::lookup_app_version(
--    PROJECT* project, APP* app, int version_num, char* plan_class
-+    const PROJECT* const project, const APP* const app, const int version_num, const char* const plan_class
- ) {
-     unsigned int i;
-     for (i=0; i<app_versions.size(); i++) {
-@@ -940,7 +940,7 @@
- }
- 
- APP_VERSION* CC_STATE::lookup_app_version_old(
--    PROJECT* project, APP* app, int version_num
-+    const PROJECT* const project, const APP* const app, const int version_num
- ) {
-     unsigned int i;
-     for (i=0; i<app_versions.size(); i++) {
-@@ -952,7 +952,7 @@
-     return 0;
- }
- 
--WORKUNIT* CC_STATE::lookup_wu(PROJECT* project, char* name) {
-+WORKUNIT* CC_STATE::lookup_wu(const PROJECT* const project, const char* const name) {
-     unsigned int i;
-     for (i=0; i<wus.size(); i++) {
-         if (wus[i]->project != project) continue;
-@@ -961,7 +961,7 @@
-     return 0;
- }
- 
--RESULT* CC_STATE::lookup_result(PROJECT* project, char* name) {
-+RESULT* CC_STATE::lookup_result(const PROJECT* const project, const char* const name) {
-     unsigned int i;
-     for (i=0; i<results.size(); i++) {
-         if (results[i]->project != project) continue;
-@@ -970,7 +970,7 @@
-     return 0;
- }
- 
--RESULT* CC_STATE::lookup_result(char* url, char* name) {
-+RESULT* CC_STATE::lookup_result(const char* const url, const char* const name) {
-     unsigned int i;
-     for (i=0; i<results.size(); i++) {
-         if (strcmp(results[i]->project->master_url, url)) continue;
diff --git a/debian/patches/AddingMoreConst.patch b/debian/patches/AddingMoreConst.patch
deleted file mode 100644
index ac597fb..0000000
--- a/debian/patches/AddingMoreConst.patch
+++ /dev/null
@@ -1,2816 +0,0 @@
-Author: Steffen Moeller <moeller at debian.org>
-Description: The patch adds "const" where values are not
- supposed to change. Well meant, but not accepted by upstream
- and should hence not be in. Becaues of issues with inheritance
- of virtual functions, the introduction of const may be harmful.
- This patch should not be used. And it is not.
-
-Index: boinc/clientgui/ViewWork.cpp
-===================================================================
---- boinc.orig/clientgui/ViewWork.cpp	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewWork.cpp	2011-11-25 22:37:25.000000000 +0100
-@@ -96,7 +96,7 @@
- 
- static CViewWork* myCViewWork;
- 
--static bool CompareViewWorkItems(int iRowIndex1, int iRowIndex2) {
-+static bool CompareViewWorkItems(const int iRowIndex1, const int iRowIndex2) {
-     CWork*          work1;
-     CWork*          work2;
-     int             result = false;
-@@ -165,7 +165,7 @@
- {}
- 
- 
--CViewWork::CViewWork(wxNotebook* pNotebook) :
-+CViewWork::CViewWork(wxNotebook* const pNotebook) :
-     CBOINCBaseView(pNotebook, ID_TASK_WORKVIEW, DEFAULT_TASK_FLAGS, ID_LIST_WORKVIEW, DEFAULT_LIST_MULTI_SEL_FLAGS)
- {
-     CTaskItemGroup* pGroup = NULL;
-@@ -244,29 +244,29 @@
- }
- 
- 
--wxString& CViewWork::GetViewName() {
-+wxString& CViewWork::GetViewName() const {
-     static wxString strViewName(wxT("Tasks"));
-     return strViewName;
- }
- 
- 
--wxString& CViewWork::GetViewDisplayName() {
-+wxString& CViewWork::GetViewDisplayName() const {
-     static wxString strViewName(_("Tasks"));
-     return strViewName;
- }
- 
- 
--const char** CViewWork::GetViewIcon() {
-+const char** CViewWork::GetViewIcon() const {
-     return result_xpm;
- }
- 
- 
--const int CViewWork::GetViewCurrentViewPage() {
-+int CViewWork::GetViewCurrentViewPage() const {
-     return VW_TASK;
- }
- 
- 
--wxString CViewWork::GetKeyValue1(int iRowIndex) {
-+wxString CViewWork::GetKeyValue1(const int iRowIndex) const {
-     CWork*          work;
- 
-     if (GetWorkCacheAtIndex(work, m_iSortedIndexes[iRowIndex])) {
-@@ -277,7 +277,7 @@
- }
- 
- 
--wxString CViewWork::GetKeyValue2(int iRowIndex) {
-+wxString CViewWork::GetKeyValue2(const int iRowIndex) const {
-      CWork*          work;
- 
-     if (GetWorkCacheAtIndex(work, m_iSortedIndexes[iRowIndex])) {
-@@ -288,7 +288,7 @@
- }
- 
- 
--int CViewWork::FindRowIndexByKeyValues(wxString& key1, wxString& key2) {
-+int CViewWork::FindRowIndexByKeyValues(const wxString& key1, const wxString& key2) const {
-     CWork* work;
-     unsigned int iRowIndex, n = GetCacheCount();
-     for(iRowIndex=0; iRowIndex < n; iRowIndex++) {
-@@ -485,7 +485,7 @@
- }
- 
- 
--bool CViewWork::OnSaveState(wxConfigBase* pConfig) {
-+bool CViewWork::OnSaveState(wxConfigBase* const pConfig) {
-     bool bReturnValue = true;
-     CMainDocument* pDoc     = wxGetApp().GetDocument();
- 
-@@ -511,7 +511,7 @@
- }
- 
- 
--bool CViewWork::OnRestoreState(wxConfigBase* pConfig) {
-+bool CViewWork::OnRestoreState(wxConfigBase* const pConfig) {
-     CMainDocument* pDoc     = wxGetApp().GetDocument();
- 
-     wxASSERT(pDoc);
-@@ -564,7 +564,7 @@
- }
- 
- 
--wxInt32 CViewWork::GetDocCount() {
-+wxInt32 CViewWork::GetDocCount() const {
-     return wxGetApp().GetDocument()->GetWorkCount();
- }
- 
-@@ -640,7 +640,7 @@
- }
- 
- 
--wxInt32 CViewWork::GetCacheCount() {
-+wxInt32 CViewWork::GetCacheCount() const {
-     return (wxInt32)m_WorkCache.size();
- }
- 
-@@ -657,7 +657,7 @@
- }
- 
- 
--bool CViewWork::IsSelectionManagementNeeded() {
-+bool CViewWork::IsSelectionManagementNeeded() const {
-     return true;
- }
- 
-@@ -807,7 +807,7 @@
- }
- 
- 
--bool CViewWork::SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex) {
-+bool CViewWork::SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex) {
-     wxString    strDocumentText  = wxEmptyString;
-     wxString    strDocumentText2 = wxEmptyString;
-     float       fDocumentFloat = 0.0;
-@@ -891,7 +891,7 @@
- }
- 
- 
--void CViewWork::GetDocProjectName(wxInt32 item, wxString& strBuffer) const {
-+int CViewWork::GetDocProjectName(const wxInt32 item, wxString& strBuffer) const {
-     CMainDocument* doc = wxGetApp().GetDocument();
-     RESULT* result = wxGetApp().GetDocument()->result(item);
-     PROJECT* state_project = NULL;
-@@ -909,11 +909,13 @@
-          } else {
-             doc->ForceCacheUpdate();
-         }
-+        return 0;
-     }
-+    return -1;
- }
- 
- 
--void CViewWork::GetDocApplicationName(wxInt32 item, wxString& strBuffer) const {
-+int CViewWork::GetDocApplicationName(const wxInt32 item, wxString& strBuffer) const {
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     RESULT*        result = wxGetApp().GetDocument()->result(item);
-     RESULT*        state_result = NULL;
-@@ -930,13 +932,13 @@
-             state_result = pDoc->state.lookup_result(result->project_url, result->name);
-         }
- 
--        if (!state_result) return;
-+        if (!state_result) return -1;
-         WORKUNIT* wup = state_result->wup;
--        if (!wup) return;
-+        if (!wup) return -1;
-         APP* app = wup->app;
--        if (!app) return;
-+        if (!app) return -1;
-         APP_VERSION* avp = state_result->avp;
--        if (!avp) return;
-+        if (!avp) return -1;
- 
-         if (strlen(app->user_friendly_name)) {
-             strAppBuffer = HtmlEntityDecode(wxString(state_result->app->user_friendly_name, wxConvUTF8));
-@@ -959,21 +961,33 @@
-             state_result->avp->version_num % 100,
-             strClassBuffer.c_str()
-         );
-+        return 0;
-     }
-+    return -1;
- }
- 
- 
--void CViewWork::GetDocName(wxInt32 item, wxString& strBuffer) const {
--    RESULT* result = wxGetApp().GetDocument()->result(item);
-+int CViewWork::GetDocName(const wxInt32 item, wxString& strBuffer) const {
-+
-+    CMainDocument* pDoc   = wxGetApp().GetDocument();
-+    if (!pDoc) return -1;
-+
-+    RESULT* result = pDoc->result(item);
- 
-     if (result) {
-         strBuffer = wxString(result->name, wxConvUTF8);
-+        return 0;
-     }
-+    return -1;
- }
- 
- 
--void CViewWork::GetDocCPUTime(wxInt32 item, float& fBuffer) const {
--    RESULT*        result = wxGetApp().GetDocument()->result(item);
-+int CViewWork::GetDocCPUTime(wxInt32 item, float& fBuffer) const {
-+
-+    CMainDocument* pDoc   = wxGetApp().GetDocument();
-+    if (!pDoc) return -1;
-+
-+    RESULT*        result = pDoc->result(item);
- 
-     fBuffer = 0;
-     if (result) {
-@@ -988,11 +1002,14 @@
-                 if (!fBuffer) fBuffer = result->final_cpu_time;
-             }
-         }
-+        return 0;
-     }
-+
-+    return -1;
- }
- 
- 
--wxInt32 CViewWork::FormatCPUTime(float fBuffer, wxString& strBuffer) const {
-+wxInt32 CViewWork::FormatCPUTime(const float fBuffer, wxString& strBuffer) const {
-     wxInt32        iHour = 0;
-     wxInt32        iMin = 0;
-     wxInt32        iSec = 0;
-@@ -1014,7 +1031,7 @@
- }
- 
- 
--void CViewWork::GetDocProgress(wxInt32 item, float& fBuffer) const {
-+int CViewWork::GetDocProgress(const wxInt32 item, float& fBuffer) const {
-     RESULT*        result = wxGetApp().GetDocument()->result(item);
- 
-     fBuffer = 0;
-@@ -1028,7 +1045,9 @@
-                 fBuffer = 100.0;
-             }
-         }
-+	return 0;
-     }
-+    return -1;
- }
- 
- 
-@@ -1039,17 +1058,19 @@
- }
- 
- 
--void CViewWork::GetDocTimeToCompletion(wxInt32 item, float& fBuffer) const {
-+int CViewWork::GetDocTimeToCompletion(const wxInt32 item, float& fBuffer) const {
-     RESULT*        result = wxGetApp().GetDocument()->result(item);
- 
-     fBuffer = 0;
-     if (result) {
-         fBuffer = result->estimated_cpu_time_remaining;
-+	return 0;
-     }
-+    return -1;
- }
- 
- 
--wxInt32 CViewWork::FormatTimeToCompletion(float fBuffer, wxString& strBuffer) const {
-+wxInt32 CViewWork::FormatTimeToCompletion(const float fBuffer, wxString& strBuffer) const {
-     double         est = fBuffer;
-     wxInt32        iHour = 0;
-     wxInt32        iMin = 0;
-@@ -1075,18 +1096,20 @@
- }
- 
- 
--void CViewWork::GetDocReportDeadline(wxInt32 item, time_t& time) const {
-+int CViewWork::GetDocReportDeadline(const wxInt32 item, time_t& time) const {
-     RESULT*        result = wxGetApp().GetDocument()->result(item);
- 
-     if (result) {
-         time = (time_t)result->report_deadline;
-+	return 0;
-     } else {
-         time = (time_t)0;
-+	return -1;
-     }
- }
- 
- 
--wxInt32 CViewWork::FormatReportDeadline(time_t deadline, wxString& strBuffer) const {
-+wxInt32 CViewWork::FormatReportDeadline(const time_t deadline, wxString& strBuffer) const {
-     wxDateTime     dtTemp;
- 
-     dtTemp.Set(deadline);
-@@ -1098,7 +1121,7 @@
- 
- 
- 
--wxInt32 CViewWork::FormatStatus(wxInt32 item, wxString& strBuffer) const {
-+wxInt32 CViewWork::FormatStatus(const wxInt32 item, wxString& strBuffer) const {
-     CWork*          work;
- 
-     try {
-@@ -1116,16 +1139,18 @@
- }
- 
- 
--void CViewWork::GetDocProjectURL(wxInt32 item, wxString& strBuffer) const {
-+int CViewWork::GetDocProjectURL(const wxInt32 item, wxString& strBuffer) const {
-     RESULT* result = wxGetApp().GetDocument()->result(item);
- 
-     if (result) {
-         strBuffer = wxString(result->project_url, wxConvUTF8);
-+	return 0;
-     }
-+    return -1;
- }
- 
- 
--double CViewWork::GetProgressValue(long item) {
-+double CViewWork::GetProgressValue(const long item) const {
-     float          fBuffer = 0;
-     RESULT*        result = wxGetApp().GetDocument()->result(m_iSortedIndexes[item]);
- 
-@@ -1146,7 +1171,7 @@
- }
- 
- 
--wxString CViewWork::GetProgressText( long item) {
-+wxString CViewWork::GetProgressText( const long item) const {
-     CWork*    work      = NULL;
-     wxString  strBuffer = wxEmptyString;
-     
-@@ -1160,7 +1185,7 @@
- }
- 
- 
--int CViewWork::GetWorkCacheAtIndex(CWork*& workPtr, int index) {
-+int CViewWork::GetWorkCacheAtIndex(CWork*& workPtr, const int index) const {
-     try {
-         workPtr = m_WorkCache.at(index);
-     } catch ( std::out_of_range ) {
-Index: boinc/clientgui/ViewWork.h
-===================================================================
---- boinc.orig/clientgui/ViewWork.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewWork.h	2011-11-25 22:36:25.000000000 +0100
-@@ -58,14 +58,14 @@
- 
-     ~CViewWork();
- 
--    virtual wxString&       GetViewName();
--    virtual wxString&       GetViewDisplayName();
--    virtual const char**    GetViewIcon();
--    virtual const int       GetViewCurrentViewPage();
--
--    virtual wxString        GetKeyValue1(int iRowIndex);
--    virtual wxString        GetKeyValue2(int iRowIndex);
--    virtual int             FindRowIndexByKeyValues(wxString& key1, wxString& key2);
-+    virtual wxString&       GetViewName() const;
-+    virtual wxString&       GetViewDisplayName() const;
-+    virtual const char**    GetViewIcon() const;
-+    virtual int             GetViewCurrentViewPage() const;
-+
-+    virtual wxString        GetKeyValue1(const int iRowIndex) const;
-+    virtual wxString        GetKeyValue2(const int iRowIndex) const;
-+    virtual int             FindRowIndexByKeyValues(const wxString& key1, const wxString& key2) const;
- 
-     void                    OnWorkSuspend( wxCommandEvent& event );
-     void                    OnWorkShowGraphics( wxCommandEvent& event );
-@@ -79,40 +79,40 @@
- 
- protected:
- 
--    virtual wxInt32         GetDocCount();
-+    virtual wxInt32         GetDocCount() const;
- 
-     virtual wxString        OnListGetItemText( long item, long column ) const;
- 
--    virtual bool            OnSaveState( wxConfigBase* pConfig );
--    virtual bool            OnRestoreState( wxConfigBase* pConfig );
-+    virtual bool            OnSaveState( wxConfigBase* const pConfig );
-+    virtual bool            OnRestoreState( wxConfigBase* const pConfig );
- 
-     virtual wxInt32         AddCacheElement();
-     virtual wxInt32         EmptyCache();
--    virtual wxInt32         GetCacheCount();
-+    virtual wxInt32         GetCacheCount() const;
-     virtual wxInt32         RemoveCacheElement();
--    virtual bool            SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex);
-+    virtual bool            SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex);
- 
--    virtual bool            IsSelectionManagementNeeded();
-+    virtual bool            IsSelectionManagementNeeded() const;
- 
-     virtual void            UpdateSelection();
- 
--    void                    GetDocProjectName(wxInt32 item, wxString& strBuffer) const;
--    void                    GetDocApplicationName(wxInt32 item, wxString& strBuffer) const;
--    void                    GetDocName(wxInt32 item, wxString& strBuffer) const;
--    void                    GetDocCPUTime(wxInt32 item, float& fBuffer) const;
-+    int                     GetDocProjectName(const wxInt32 item, wxString& strBuffer) const;
-+    int                     GetDocApplicationName(const wxInt32 item, wxString& strBuffer) const;
-+    int                     GetDocName(const wxInt32 item, wxString& strBuffer) const;
-+    int                     GetDocCPUTime(const wxInt32 item, float& fBuffer) const;
-     wxInt32                 FormatCPUTime( float fBuffer, wxString& strBuffer ) const;
--    void                    GetDocProgress(wxInt32 item, float& fBuffer) const;
-+    int                     GetDocProgress(const wxInt32 item, float& fBuffer) const;
-     wxInt32                 FormatProgress( float fBuffer, wxString& strBuffer ) const;
--    void                    GetDocTimeToCompletion(wxInt32 item, float& fBuffer) const;
-+    int                     GetDocTimeToCompletion(const wxInt32 item, float& fBuffer) const;
-     wxInt32                 FormatTimeToCompletion( float fBuffer, wxString& strBuffer ) const;
--    void                    GetDocReportDeadline(wxInt32 item, time_t& time) const;
--    wxInt32                 FormatReportDeadline( time_t deadline, wxString& strBuffer ) const;
--    wxInt32                 FormatStatus( wxInt32 item, wxString& strBuffer ) const;
--    void                    GetDocProjectURL(wxInt32 item, wxString& strBuffer) const;
--    virtual double          GetProgressValue(long item);
--    virtual wxString        GetProgressText( long item);
-+    int                     GetDocReportDeadline(wxInt32 item, time_t& time) const;
-+    wxInt32                 FormatReportDeadline( const time_t deadline, wxString& strBuffer ) const;
-+    wxInt32                 FormatStatus(const wxInt32 item, wxString& strBuffer ) const;
-+    int                     GetDocProjectURL(const wxInt32 item, wxString& strBuffer) const;
-+    virtual double          GetProgressValue(const long item) const;
-+    virtual wxString        GetProgressText( const long item) const;
- 
--    int                     GetWorkCacheAtIndex(CWork*& workPtr, int index);
-+    int                     GetWorkCacheAtIndex(CWork*& workPtr, const int index) const;
-     
-     DECLARE_EVENT_TABLE()
- };
-Index: boinc/clientgui/BOINCBaseView.cpp
-===================================================================
---- boinc.orig/clientgui/BOINCBaseView.cpp	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/BOINCBaseView.cpp	2011-11-25 22:39:03.000000000 +0100
-@@ -37,7 +37,7 @@
- 
- CBOINCBaseView::CBOINCBaseView() {}
- 
--CBOINCBaseView::CBOINCBaseView(wxNotebook* pNotebook) :
-+CBOINCBaseView::CBOINCBaseView(wxNotebook* const pNotebook) :
-     wxPanel(pNotebook, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
- {
-     wxASSERT(pNotebook);
-@@ -70,7 +70,7 @@
- 
- 
- CBOINCBaseView::CBOINCBaseView(
--    wxNotebook* pNotebook, wxWindowID iTaskWindowID, int iTaskWindowFlags, wxWindowID iListWindowID, int iListWindowFlags) :
-+    wxNotebook* const pNotebook, const wxWindowID iTaskWindowID, const int iTaskWindowFlags, const wxWindowID iListWindowID, const int iListWindowFlags) :
-     wxPanel(pNotebook, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
- {
-     wxASSERT(pNotebook);
-@@ -172,7 +172,7 @@
- // The name of the view.
- //   If it has not been defined by the view "Undefined" is returned.
- //
--wxString& CBOINCBaseView::GetViewName() {
-+wxString& CBOINCBaseView::GetViewName() const {
-     static wxString strViewName(wxT("Undefined"));
-     return strViewName;
- }
-@@ -181,7 +181,7 @@
- // The user friendly name of the view.
- //   If it has not been defined by the view "Undefined" is returned.
- //
--wxString& CBOINCBaseView::GetViewDisplayName() {
-+wxString& CBOINCBaseView::GetViewDisplayName() const {
-     static wxString strViewName(wxT("Undefined"));
-     return strViewName;
- }
-@@ -190,7 +190,7 @@
- // The user friendly icon of the view.
- //   If it has not been defined by the view the BOINC icon is returned.
- //
--const char** CBOINCBaseView::GetViewIcon() {
-+const char** CBOINCBaseView::GetViewIcon() const {
-     wxASSERT(boinc_xpm);
-     return boinc_xpm;
- }
-@@ -199,44 +199,44 @@
- // The rate at which the view is refreshed.
- //   If it has not been defined by the view 1 second is retrned.
- //
--const int CBOINCBaseView::GetViewRefreshRate() {
-+int CBOINCBaseView::GetViewRefreshRate() const {
-     return 1;
- }
- 
- 
- // Get bit mask of current view(s).
- //
--const int CBOINCBaseView::GetViewCurrentViewPage() {
-+int CBOINCBaseView::GetViewCurrentViewPage() const {
-     return 0;
- }
- 
- 
--wxString CBOINCBaseView::GetKeyValue1(int) {
-+wxString CBOINCBaseView::GetKeyValue1(const int) const {
-     return wxEmptyString;
- }
- 
- 
--wxString CBOINCBaseView::GetKeyValue2(int) {
-+wxString CBOINCBaseView::GetKeyValue2(const int) const {
-     return wxEmptyString;
- }
- 
- 
--int CBOINCBaseView::FindRowIndexByKeyValues(wxString&, wxString&) {
-+int CBOINCBaseView::FindRowIndexByKeyValues(const wxString&, const wxString&) const {
-     return -1;
- }
- 
- 
--bool CBOINCBaseView::FireOnSaveState(wxConfigBase* pConfig) {
-+bool CBOINCBaseView::FireOnSaveState(wxConfigBase* const pConfig) {
-     return OnSaveState(pConfig);
- }
- 
- 
--bool CBOINCBaseView::FireOnRestoreState(wxConfigBase* pConfig) {
-+bool CBOINCBaseView::FireOnRestoreState(wxConfigBase* const pConfig) {
-     return OnRestoreState(pConfig);
- }
- 
- 
--int CBOINCBaseView::GetListRowCount() {
-+int CBOINCBaseView::GetListRowCount() const {
-     wxASSERT(m_pListPane);
-     return m_pListPane->GetItemCount();
- }
-@@ -257,12 +257,12 @@
- }
- 
- 
--wxString CBOINCBaseView::FireOnListGetItemText(long item, long column) const {
-+wxString CBOINCBaseView::FireOnListGetItemText(const long item, const long column) const {
-     return OnListGetItemText(item, column);
- }
- 
- 
--int CBOINCBaseView::FireOnListGetItemImage(long item) const {
-+int CBOINCBaseView::FireOnListGetItemImage(const long item) const {
-     return OnListGetItemImage(item);
- }
- 
-@@ -273,7 +273,7 @@
- }
- 
- 
--wxListItemAttr* CBOINCBaseView::OnListGetItemAttr(long item) const {
-+wxListItemAttr* CBOINCBaseView::OnListGetItemAttr(const long item) const {
- 
-     // If we are using some theme where the default background color isn't
-     //   white, then our whole system is boned. Use defaults instead.
-@@ -366,7 +366,7 @@
- }
- 
- 
--bool CBOINCBaseView::OnSaveState(wxConfigBase* pConfig) {
-+bool CBOINCBaseView::OnSaveState(wxConfigBase* const pConfig) {
-     bool bReturnValue = true;
- 
-     wxASSERT(pConfig);
-@@ -385,7 +385,7 @@
- }
- 
- 
--bool CBOINCBaseView::OnRestoreState(wxConfigBase* pConfig) {
-+bool CBOINCBaseView::OnRestoreState(wxConfigBase* const pConfig) {
-     wxASSERT(pConfig);
-     wxASSERT(m_pTaskPane);
-     wxASSERT(m_pListPane);
-@@ -443,12 +443,12 @@
- }
- 
- 
--wxString CBOINCBaseView::OnListGetItemText(long WXUNUSED(item), long WXUNUSED(column)) const {
-+wxString CBOINCBaseView::OnListGetItemText(const long WXUNUSED(item), const long WXUNUSED(column)) const {
-     return wxString(wxT("Undefined"));
- }
- 
- 
--int CBOINCBaseView::OnListGetItemImage(long WXUNUSED(item)) const {
-+int CBOINCBaseView::OnListGetItemImage(const long WXUNUSED(item)) const {
-     return -1;
- }
- 
-@@ -458,12 +458,12 @@
- }
- 
- 
--wxString CBOINCBaseView::OnDocGetItemImage(long WXUNUSED(item)) const {
-+wxString CBOINCBaseView::OnDocGetItemImage(const long WXUNUSED(item)) const {
-     return wxString(wxT("Undefined"));
- }
- 
- 
--wxString CBOINCBaseView::OnDocGetItemAttr(long WXUNUSED(item)) const {
-+wxString CBOINCBaseView::OnDocGetItemAttr(const long WXUNUSED(item)) const {
-     return wxString(wxT("Undefined"));
- }
- 
-@@ -478,7 +478,7 @@
- }
- 
- 
--int CBOINCBaseView::GetCacheCount() {
-+int CBOINCBaseView::GetCacheCount() const {
-     return -1;
- }
- 
-@@ -743,7 +743,7 @@
- }
- 
- 
--void CBOINCBaseView::UpdateWebsiteSelection(long lControlGroup, PROJECT* project){
-+void CBOINCBaseView::UpdateWebsiteSelection(const long lControlGroup, const PROJECT* const project){
-     unsigned int        i;
-     CTaskItemGroup*     pGroup = NULL;
-     CTaskItem*          pItem = NULL;
-@@ -818,7 +818,7 @@
- }
- 
- 
--bool CBOINCBaseView::IsSelectionManagementNeeded() {
-+bool CBOINCBaseView::IsSelectionManagementNeeded() const {
-     return false;
- }
- 
-@@ -833,17 +833,17 @@
- }
- 
- 
--double CBOINCBaseView::GetProgressValue(long) {
-+double CBOINCBaseView::GetProgressValue(const long) const {
-     return 0.0;
- }
- 
- 
--wxString CBOINCBaseView::GetProgressText( long ) {
-+wxString CBOINCBaseView::GetProgressText(const long) const {
-     return wxEmptyString;
- }
- 
- 
--void CBOINCBaseView::append_to_status(wxString& existing, const wxChar* additional) {
-+void CBOINCBaseView::append_to_status(wxString& existing, const wxChar* const additional) {
-     if (existing.size() == 0) {
-         existing = additional;
-     } else {
-@@ -856,7 +856,7 @@
- // http://www.webreference.com/html/reference/character/
- // Completed: The ISO Latin 1 Character Set
- //
--wxString CBOINCBaseView::HtmlEntityEncode(wxString strRaw) {
-+wxString CBOINCBaseView::HtmlEntityEncode(const wxString strRaw) {
- 	wxString strEncodedHtml(strRaw);
- 
- #ifdef __WXMSW__
-@@ -983,7 +983,7 @@
-     return strEncodedHtml;
- }
- 
--wxString CBOINCBaseView::HtmlEntityDecode(wxString strRaw) {
-+wxString CBOINCBaseView::HtmlEntityDecode(const wxString strRaw) {
- 	wxString strDecodedHtml(strRaw);
- 
-     if (0 <= strDecodedHtml.Find(wxT("&"))) {
-Index: boinc/clientgui/BOINCBaseView.h
-===================================================================
---- boinc.orig/clientgui/BOINCBaseView.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/BOINCBaseView.h	2011-11-25 22:29:07.000000000 +0100
-@@ -44,10 +44,10 @@
- class CTaskItem : wxObject {
- public:
- 	CTaskItem();
--	CTaskItem( wxString strName, wxString strDescription, wxInt32 iEventID ) :
-+	CTaskItem( const wxString strName, const wxString strDescription, const wxInt32 iEventID ) :
- 		m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID),
-         m_pButton(NULL), m_strWebSiteLink(wxT("")) {};
--	CTaskItem( wxString strName, wxString strDescription, wxString strWebSiteLink, wxInt32 iEventID ) :
-+	CTaskItem( const wxString strName, const wxString strDescription, const wxString strWebSiteLink, const wxInt32 iEventID ) :
- 		m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID),  
-         m_pButton(NULL), m_strWebSiteLink(strWebSiteLink) {};
-     ~CTaskItem() {};
-@@ -64,7 +64,7 @@
- class CTaskItemGroup : wxObject {
- public:
- 	CTaskItemGroup();
--	CTaskItemGroup( wxString strName ) :
-+	CTaskItemGroup( const wxString strName ) :
-             m_strName(strName), m_pStaticBox(NULL), m_pStaticBoxSizer(NULL) {
-             m_Tasks.clear();
- #ifdef __WXMAC__
-@@ -76,7 +76,7 @@
-         RemoveMacAccessibilitySupport();
- #endif
-     };
--    wxButton* button(int i) {return m_Tasks[i]->m_pButton;}
-+    wxButton* button(const int i) {return m_Tasks[i]->m_pButton;}
- 
-     wxString                m_strName;
- 
-@@ -94,7 +94,7 @@
- #endif
- };
- 
--typedef bool     (*ListSortCompareFunc)(int, int);
-+typedef bool     (*ListSortCompareFunc)(const int, const int);
- 
- 
- class CBOINCBaseView : public wxPanel {
-@@ -104,44 +104,44 @@
- 
-     CBOINCBaseView();
-     CBOINCBaseView(
--        wxNotebook* pNotebook
-+        wxNotebook* const pNotebook
-     );
-     CBOINCBaseView(
--        wxNotebook* pNotebook,
--        wxWindowID iTaskWindowID,
--        int iTaskWindowFlags,
--        wxWindowID iListWindowID,
--        int iListWindowFlags
-+        wxNotebook* const pNotebook,
-+        const wxWindowID iTaskWindowID,
-+        const int iTaskWindowFlags,
-+        const wxWindowID iListWindowID,
-+        const int iListWindowFlags
-     );
- 
-     ~CBOINCBaseView();
- 
--    virtual wxString&       GetViewName();
--    virtual wxString&       GetViewDisplayName();
--    virtual const char**    GetViewIcon();
--    virtual const int       GetViewRefreshRate();
--    virtual const int       GetViewCurrentViewPage();
--
--    virtual wxString        GetKeyValue1(int iRowIndex);
--    virtual wxString        GetKeyValue2(int iRowIndex);
--    virtual int             FindRowIndexByKeyValues(wxString& key1, wxString& key2);
-+    virtual wxString&       GetViewName() const;
-+    virtual wxString&       GetViewDisplayName() const;
-+    virtual const char**    GetViewIcon() const;
-+    virtual int             GetViewRefreshRate() const;
-+    virtual int             GetViewCurrentViewPage() const;
-+
-+    virtual wxString        GetKeyValue1(const int iRowIndex) const;
-+    virtual wxString        GetKeyValue2(const int iRowIndex) const;
-+    virtual int             FindRowIndexByKeyValues(const wxString& key1, const wxString& key2) const;
- 
--    bool                    FireOnSaveState( wxConfigBase* pConfig );
--    bool                    FireOnRestoreState( wxConfigBase* pConfig );
-+    bool                    FireOnSaveState( wxConfigBase* const pConfig );
-+    bool                    FireOnRestoreState( wxConfigBase* const pConfig );
- 
--    virtual int             GetListRowCount();
-+    virtual int             GetListRowCount() const;
-     void                    FireOnListRender( wxTimerEvent& event );
-     void                    FireOnListSelected( wxListEvent& event );
-     void                    FireOnListDeselected( wxListEvent& event );
--    wxString                FireOnListGetItemText( long item, long column ) const;
--    int                     FireOnListGetItemImage( long item ) const;
-+    wxString                FireOnListGetItemText( const long item, long column ) const;
-+    int                     FireOnListGetItemImage( const long item ) const;
- #if BASEVIEW_STRIPES
--    wxListItemAttr*         FireOnListGetItemAttr( long item ) const;
-+    wxListItemAttr*         FireOnListGetItemAttr( const long item ) const;
- #endif
- 
--    int                     GetProgressColumn() { return m_iProgressColumn; }
--    virtual double          GetProgressValue(long item);
--    virtual wxString        GetProgressText( long item);
-+    int                     GetProgressColumn() const { return m_iProgressColumn; }
-+    virtual double          GetProgressValue(const long item) const;
-+    virtual wxString        GetProgressText( const long item) const;
- 
-     void                    InitSort();
-     
-@@ -152,7 +152,7 @@
-     void                    RefreshTaskPane();
- 
- #ifdef __WXMAC__
--    CBOINCListCtrl*         GetListCtrl() { return m_pListPane; }
-+    CBOINCListCtrl*         GetListCtrl() const { return m_pListPane; }
- #endif    
-  
-     std::vector<CTaskItemGroup*> m_TaskGroups;
-@@ -167,28 +167,28 @@
- 
- protected:
- 
--    virtual bool            OnSaveState( wxConfigBase* pConfig );
--    virtual bool            OnRestoreState( wxConfigBase* pConfig );
-+    virtual bool            OnSaveState( wxConfigBase* const pConfig );
-+    virtual bool            OnRestoreState( wxConfigBase* const pConfig );
- 
-     virtual void            OnListRender( wxTimerEvent& event );
-     virtual void            OnListSelected( wxListEvent& event );
-     virtual void            OnListDeselected( wxListEvent& event );
-     virtual void            OnCacheHint(wxListEvent& event);
--    virtual wxString        OnListGetItemText( long item, long column ) const;
--    virtual int             OnListGetItemImage( long item ) const;
-+    virtual wxString        OnListGetItemText( const long item, const long column ) const;
-+    virtual int             OnListGetItemImage( const long item ) const;
- 
-     void                    OnColClick(wxListEvent& event);
-     
-     virtual int             GetDocCount();
--    virtual wxString        OnDocGetItemImage( long item ) const;
--    virtual wxString        OnDocGetItemAttr( long item ) const;
-+    virtual wxString        OnDocGetItemImage( const long item ) const;
-+    virtual wxString        OnDocGetItemAttr( const long item ) const;
- 
-     virtual int             AddCacheElement();
-     virtual int             EmptyCache();
--    virtual int             GetCacheCount();
-+    virtual int             GetCacheCount() const;
-     virtual int             RemoveCacheElement();
-     virtual int             SynchronizeCache();
--    virtual bool            SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex);
-+    virtual bool            SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex);
-     void                    sortData();
- 
-     virtual void            EmptyTasks();
-@@ -197,21 +197,21 @@
-     virtual void            UpdateSelection();
-     virtual void            PostUpdateSelection();
- 
--    virtual void            UpdateWebsiteSelection(long lControlGroup, PROJECT* project);
-+    virtual void            UpdateWebsiteSelection(const long lControlGroup, const PROJECT* const project);
- 
- 
-     bool                    _IsSelectionManagementNeeded();
--    virtual bool            IsSelectionManagementNeeded();
-+    virtual bool            IsSelectionManagementNeeded() const;
- 
-     bool                    _EnsureLastItemVisible();
-     virtual bool            EnsureLastItemVisible();
- 
--    static  void            append_to_status(wxString& existing, const wxChar* additional);
--    static  wxString        HtmlEntityEncode(wxString strRaw);
--    static  wxString        HtmlEntityDecode(wxString strRaw);
-+    static  void            append_to_status(wxString& existing, const wxChar* const additional);
-+    static  wxString        HtmlEntityEncode(const wxString strRaw);
-+    static  wxString        HtmlEntityDecode(const wxString strRaw);
- 
- #if BASEVIEW_STRIPES
--    virtual wxListItemAttr* OnListGetItemAttr( long item ) const;
-+    virtual wxListItemAttr* OnListGetItemAttr( const long item ) const;
- 
-     wxListItemAttr*         m_pWhiteBackgroundAttr;
-     wxListItemAttr*         m_pGrayBackgroundAttr;
-Index: boinc/clientgui/MainDocument.cpp
-===================================================================
---- boinc.orig/clientgui/MainDocument.cpp	2011-11-14 01:05:10.000000000 +0100
-+++ boinc/clientgui/MainDocument.cpp	2011-11-25 22:18:02.000000000 +0100
-@@ -1448,7 +1448,7 @@
- }
- 
- 
--RESULT* CMainDocument::result(unsigned int i) {
-+RESULT* CMainDocument::result(const unsigned int i) const {
-     RESULT* pResult = NULL;
- 
-     try {
-@@ -1463,7 +1463,7 @@
- }
- 
- /* get the result not by index, but by name */
--RESULT* CMainDocument::result(const wxString& name, const wxString& project_url) {
-+RESULT* CMainDocument::result(const wxString& name, const wxString& project_url) const {
-     RESULT* pResult = NULL;
- 
-     try {
-@@ -1636,7 +1636,7 @@
-     kill_program(pid);
- }
- #else
--void CMainDocument::KillGraphicsApp(int pid) {
-+void CMainDocument::KillGraphicsApp(const int pid) {
-     char* argv[6];
-     char currentDir[1024];
-     char thePIDbuf[10];
-@@ -1668,6 +1668,8 @@
- 
- int CMainDocument::WorkShowGraphics(RESULT* result)
- {
-+    if (!result || !result->graphics_exec_path) return -1;
-+
-     int iRetVal = 0;
-     
-     if (strlen(result->graphics_exec_path)) {
-Index: boinc/clientgui/MainDocument.h
-===================================================================
---- boinc.orig/clientgui/MainDocument.h	2011-11-14 01:21:54.000000000 +0100
-+++ boinc/clientgui/MainDocument.h	2011-11-25 22:17:45.000000000 +0100
-@@ -253,7 +253,7 @@
- #ifdef _WIN32
-     void                        KillGraphicsApp(HANDLE pid);
- #else
--    void                        KillGraphicsApp(int tpid);
-+    void                        KillGraphicsApp(const int tpid);
- #endif
- 
- public:
-@@ -262,8 +262,8 @@
-     int                         m_iGet_results_rpc_result;
-     bool                        m_ActiveTasksOnly;
-     
--    RESULT*                     result(unsigned int);
--    RESULT*                     result(const wxString& name, const wxString& project_url);
-+    RESULT*                     result(const unsigned int) const;
-+    RESULT*                     result(const wxString& name, const wxString& project_url) const;
- 
-     int                         GetWorkCount() /* not const */;
- 
-Index: boinc/clientgui/TermsOfUsePage.cpp
-===================================================================
---- boinc.orig/clientgui/TermsOfUsePage.cpp	2011-04-25 18:41:15.000000000 +0200
-+++ boinc/clientgui/TermsOfUsePage.cpp	2011-11-25 21:45:21.000000000 +0100
-@@ -66,7 +66,7 @@
- {
- }
-   
--CTermsOfUsePage::CTermsOfUsePage( CBOINCBaseWizard* parent )
-+CTermsOfUsePage::CTermsOfUsePage( CBOINCBaseWizard* const parent )
- {
-     Create( parent );
- }
-@@ -75,7 +75,7 @@
-  * CTermsOfUsePage creator
-  */
-  
--bool CTermsOfUsePage::Create( CBOINCBaseWizard* parent )
-+bool CTermsOfUsePage::Create( CBOINCBaseWizard* const parent )
- {
- ////@begin CTermsOfUsePage member initialisation
-     m_pTitleStaticCtrl = NULL;
-@@ -180,7 +180,7 @@
-  * Get bitmap resources
-  */
-  
--wxBitmap CTermsOfUsePage::GetBitmapResource( const wxString& WXUNUSED(name) )
-+wxBitmap CTermsOfUsePage::GetBitmapResource( const wxString& WXUNUSED(name) ) const
- {
-     // Bitmap retrieval
-  
-@@ -193,7 +193,7 @@
-  * Get icon resources
-  */
- 
--wxIcon CTermsOfUsePage::GetIconResource( const wxString& WXUNUSED(name) )
-+wxIcon CTermsOfUsePage::GetIconResource( const wxString& WXUNUSED(name) ) const
- {
-     // Icon retrieval
- 
-Index: boinc/clientgui/TermsOfUsePage.h
-===================================================================
---- boinc.orig/clientgui/TermsOfUsePage.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/TermsOfUsePage.h	2011-11-25 21:45:40.000000000 +0100
-@@ -35,10 +35,10 @@
-     /// Constructors
-     CTermsOfUsePage( );
- 
--    CTermsOfUsePage( CBOINCBaseWizard* parent );
-+    CTermsOfUsePage( CBOINCBaseWizard* const parent );
- 
-     /// Creation
--    bool Create( CBOINCBaseWizard* parent );
-+    bool Create( CBOINCBaseWizard* const parent );
- 
-     /// Creates the controls and sizers
-     void CreateControls();
-@@ -69,17 +69,17 @@
-     virtual wxWizardPageEx* GetNext() const;
- 
-     /// Retrieves bitmap resources
--    wxBitmap GetBitmapResource( const wxString& name );
-+    wxBitmap GetBitmapResource( const wxString& name ) const;
- 
-     /// Retrieves icon resources
--    wxIcon GetIconResource( const wxString& name );
-+    wxIcon GetIconResource( const wxString& name ) const;
- ////@end CTermsOfUsePage member function declarations
- 
-     bool GetUserAgrees() const { return m_bUserAgrees ; }
--    void SetUserAgrees(bool value) { m_bUserAgrees = value ; }
-+    void SetUserAgrees(const bool value) { m_bUserAgrees = value ; }
- 
-     bool GetCredentialsAlreadyAvailable() const { return m_bCredentialsAlreadyAvailable ; }
--    void SetCredentialsAlreadyAvailable(bool value) { m_bCredentialsAlreadyAvailable = value ; }
-+    void SetCredentialsAlreadyAvailable(const bool value) { m_bCredentialsAlreadyAvailable = value ; }
- 
-     /// Should we show tooltips?
-     static bool ShowToolTips();
-Index: boinc/clientgui/UnavailablePage.cpp
-===================================================================
---- boinc.orig/clientgui/UnavailablePage.cpp	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/UnavailablePage.cpp	2011-11-25 21:47:17.000000000 +0100
-@@ -64,7 +64,7 @@
- {
- }
-   
--CErrUnavailablePage::CErrUnavailablePage( CBOINCBaseWizard* parent )
-+CErrUnavailablePage::CErrUnavailablePage( CBOINCBaseWizard* const parent )
- {
-     Create( parent );
- }
-@@ -73,7 +73,7 @@
-  * CErrUnavailablePage creator
-  */
-  
--bool CErrUnavailablePage::Create( CBOINCBaseWizard* parent )
-+bool CErrUnavailablePage::Create( CBOINCBaseWizard* const parent )
- {
- ////@begin CErrUnavailablePage member initialisation
-     m_pTitleStaticCtrl = NULL;
-@@ -146,7 +146,7 @@
-  * Get bitmap resources
-  */
-  
--wxBitmap CErrUnavailablePage::GetBitmapResource( const wxString& WXUNUSED(name) )
-+wxBitmap CErrUnavailablePage::GetBitmapResource( const wxString& WXUNUSED(name) ) const
- {
-     // Bitmap retrieval
-  
-@@ -159,7 +159,7 @@
-  * Get icon resources
-  */
- 
--wxIcon CErrUnavailablePage::GetIconResource( const wxString& WXUNUSED(name) )
-+wxIcon CErrUnavailablePage::GetIconResource( const wxString& WXUNUSED(name) ) const
- {
-     // Icon retrieval
- 
-Index: boinc/clientgui/UnavailablePage.h
-===================================================================
---- boinc.orig/clientgui/UnavailablePage.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/UnavailablePage.h	2011-11-25 21:47:04.000000000 +0100
-@@ -35,10 +35,10 @@
-     /// Constructors
-     CErrUnavailablePage( );
- 
--    CErrUnavailablePage( CBOINCBaseWizard* parent );
-+    CErrUnavailablePage( CBOINCBaseWizard* const parent );
- 
-     /// Creation
--    bool Create( CBOINCBaseWizard* parent );
-+    bool Create( CBOINCBaseWizard* const parent );
- 
-     /// Creates the controls and sizers
-     void CreateControls();
-@@ -62,10 +62,10 @@
-     virtual wxWizardPageEx* GetNext() const;
- 
-     /// Retrieves bitmap resources
--    wxBitmap GetBitmapResource( const wxString& name );
-+    wxBitmap GetBitmapResource( const wxString& name ) const;
- 
-     /// Retrieves icon resources
--    wxIcon GetIconResource( const wxString& name );
-+    wxIcon GetIconResource( const wxString& name ) const;
- ////@end CErrUnavailablePage member function declarations
- 
-     /// Should we show tooltips?
-Index: boinc/clientgui/ValidateAccountKey.cpp
-===================================================================
---- boinc.orig/clientgui/ValidateAccountKey.cpp	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ValidateAccountKey.cpp	2011-11-24 23:38:38.000000000 +0100
-@@ -27,7 +27,7 @@
- IMPLEMENT_DYNAMIC_CLASS(CValidateAccountKey, wxValidator)
- 
- 
--CValidateAccountKey::CValidateAccountKey(wxString *val) {
-+CValidateAccountKey::CValidateAccountKey(wxString *const val) {
-     m_stringValue = val ;
- }
- 
-@@ -51,7 +51,7 @@
- }
- 
- 
--bool CValidateAccountKey::Validate(wxWindow *parent) {
-+bool CValidateAccountKey::Validate(wxWindow *const parent) {
-     if(!CheckValidator())
-         return FALSE;
- 
-Index: boinc/clientgui/ValidateAccountKey.h
-===================================================================
---- boinc.orig/clientgui/ValidateAccountKey.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ValidateAccountKey.h	2011-11-24 23:39:21.000000000 +0100
-@@ -29,7 +29,7 @@
- 
- public:
- 
--    CValidateAccountKey( wxString *val = 0 );
-+    CValidateAccountKey( wxString * const val = 0 );
-     CValidateAccountKey( const CValidateAccountKey& val );
- 
-     ~CValidateAccountKey();
-@@ -37,7 +37,7 @@
-     virtual wxObject* Clone() const { return new CValidateAccountKey(*this); }
-     virtual bool      Copy( const CValidateAccountKey& val );
- 
--    virtual bool      Validate(wxWindow *parent);
-+    virtual bool      Validate(wxWindow *const parent);
-     virtual bool      TransferToWindow();
-     virtual bool      TransferFromWindow();
- 
-Index: boinc/clientgui/ViewMessages.cpp
-===================================================================
---- boinc.orig/clientgui/ViewMessages.cpp	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewMessages.cpp	2011-11-24 23:47:18.000000000 +0100
-@@ -59,7 +59,7 @@
- {}
- 
- 
--CViewMessages::CViewMessages(wxNotebook* pNotebook) :
-+CViewMessages::CViewMessages(wxNotebook* const pNotebook) :
-     CBOINCBaseView(pNotebook, ID_TASK_MESSAGESVIEW, DEFAULT_TASK_FLAGS, ID_LIST_MESSAGESVIEW, DEFAULT_LIST_MULTI_SEL_FLAGS)
- {
- 	CTaskItemGroup* pGroup = NULL;
-@@ -154,19 +154,19 @@
- }
- 
- 
--wxString& CViewMessages::GetViewName() {
-+wxString& CViewMessages::GetViewName() const {
-     static wxString strViewName(wxT("Messages"));
-     return strViewName;
- }
- 
- 
--wxString& CViewMessages::GetViewDisplayName() {
-+wxString& CViewMessages::GetViewDisplayName() const {
-     static wxString strViewName(_("Messages"));
-     return strViewName;
- }
- 
- 
--const char** CViewMessages::GetViewIcon() {
-+const char** CViewMessages::GetViewIcon() const {
-     return mess_xpm;
- }
- 
-@@ -310,7 +310,7 @@
- }
- 
- 
--wxInt32 CViewMessages::GetFilteredMessageIndex( wxInt32 iRow) const {
-+wxInt32 CViewMessages::GetFilteredMessageIndex( const wxInt32 iRow) const {
-     if (m_bIsFiltered) return m_iFilteredIndexes[iRow];
-     return iRow;
- }
-@@ -418,7 +418,7 @@
- }
- 
- 
--wxString CViewMessages::OnListGetItemText(long item, long column) const {
-+wxString CViewMessages::OnListGetItemText(const long item, const long column) const {
-     wxString        strBuffer   = wxEmptyString;
-     wxInt32         index       = GetFilteredMessageIndex(item);
-     
-@@ -438,7 +438,7 @@
- }
- 
- 
--wxListItemAttr* CViewMessages::OnListGetItemAttr(long item) const {
-+wxListItemAttr* CViewMessages::OnListGetItemAttr(const long item) const {
-     wxListItemAttr* pAttribute  = NULL;
-     wxInt32         index       = GetFilteredMessageIndex(item);
-     MESSAGE*        message     = wxGetApp().GetDocument()->message(index);
-@@ -516,42 +516,45 @@
- }
- 
- 
--wxInt32 CViewMessages::FormatProjectName(wxInt32 item, wxString& strBuffer) const {
-+wxInt32 CViewMessages::FormatProjectName(const wxInt32 item, wxString& strBuffer) const {
-     MESSAGE* message = wxGetApp().GetDocument()->message(item);
- 
-     if (message) {
-         strBuffer = HtmlEntityDecode(wxString(message->project.c_str(), wxConvUTF8));
-+        return 0;
-     }
--
--    return 0;
-+    return -1;
- }
- 
- 
--wxInt32 CViewMessages::FormatTime(wxInt32 item, wxString& strBuffer) const {
-+wxInt32 CViewMessages::FormatTime(const wxInt32 item, wxString& strBuffer) const {
-     wxDateTime dtBuffer;
-     MESSAGE*   message = wxGetApp().GetDocument()->message(item);
- 
-     if (message) {
-         dtBuffer.Set((time_t)message->timestamp);
-         strBuffer = dtBuffer.Format();
-+        return 0;
-     }
- 
--    return 0;
-+    return -1;
- }
- 
- 
--wxInt32 CViewMessages::FormatMessage(wxInt32 item, wxString& strBuffer) const {
-+wxInt32 CViewMessages::FormatMessage(const wxInt32 item, wxString& strBuffer) const {
-     MESSAGE*   message = wxGetApp().GetDocument()->message(item);
- 
-     if (message) {
-         strBuffer = process_client_message(message->body.c_str());
-+        return 0;
-     }
--    return 0;
-+
-+    return -1;
- }
- 
- 
- #ifdef wxUSE_CLIPBOARD
--bool CViewMessages::OpenClipboard( wxInt32 size ) {
-+bool CViewMessages::OpenClipboard( const wxInt32 size ) {
-     bool bRetVal = false;
- 
-     bRetVal = wxTheClipboard->Open();
-@@ -568,7 +571,7 @@
- }
- 
- 
--wxInt32 CViewMessages::CopyToClipboard(wxInt32 item) {
-+wxInt32 CViewMessages::CopyToClipboard(const wxInt32 item) {
-     wxInt32        iRetVal = -1;
-     wxInt32        index   = GetFilteredMessageIndex(item);
- 
-Index: boinc/clientgui/ViewMessages.h
-===================================================================
---- boinc.orig/clientgui/ViewMessages.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewMessages.h	2011-11-24 23:48:05.000000000 +0100
-@@ -34,13 +34,13 @@
- 
- public:
-     CViewMessages();
--    CViewMessages(wxNotebook* pNotebook);
-+    CViewMessages(wxNotebook* const pNotebook);
- 
-     ~CViewMessages();
- 
--    virtual wxString&       GetViewName();
--    virtual wxString&       GetViewDisplayName();
--    virtual const char**    GetViewIcon();
-+    virtual wxString&       GetViewName() const;
-+    virtual wxString&       GetViewDisplayName() const;
-+    virtual const char**    GetViewIcon() const;
- 
-     void                    OnMessagesCopyAll( wxCommandEvent& event );
-     void                    OnMessagesCopySelected( wxCommandEvent& event );
-@@ -63,25 +63,25 @@
- 
-     virtual void            OnListRender( wxTimerEvent& event );
- 
--    virtual wxInt32         GetFilteredMessageIndex( wxInt32 iRow) const;
-+    virtual wxInt32         GetFilteredMessageIndex( const wxInt32 iRow) const;
-     virtual wxInt32         GetDocCount();
- 
--    virtual wxString        OnListGetItemText( long item, long column ) const;
--    virtual wxListItemAttr* OnListGetItemAttr( long item ) const;
-+    virtual wxString        OnListGetItemText( const long item, const long column ) const;
-+    virtual wxListItemAttr* OnListGetItemAttr( const long item ) const;
- 
-     virtual bool            EnsureLastItemVisible();
- 
-     virtual void            UpdateSelection();
- 
--    wxInt32                 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
--    wxInt32                 FormatTime( wxInt32 item, wxString& strBuffer ) const;
--    wxInt32                 FormatMessage( wxInt32 item, wxString& strBuffer ) const;
-+    wxInt32                 FormatProjectName( const wxInt32 item, wxString& strBuffer ) const;
-+    wxInt32                 FormatTime( const wxInt32 item, wxString& strBuffer ) const;
-+    wxInt32                 FormatMessage( const wxInt32 item, wxString& strBuffer ) const;
- 
- #ifdef wxUSE_CLIPBOARD
-     bool                    m_bClipboardOpen;
-     wxString                m_strClipboardData;
--    bool                    OpenClipboard( wxInt32 size );
--    wxInt32                 CopyToClipboard( wxInt32 item );
-+    bool                    OpenClipboard( const wxInt32 size );
-+    wxInt32                 CopyToClipboard( const wxInt32 item );
-     bool                    CloseClipboard();
- #endif
- };
-Index: boinc/clientgui/ViewNotices.cpp
-===================================================================
---- boinc.orig/clientgui/ViewNotices.cpp	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewNotices.cpp	2011-11-25 21:48:31.000000000 +0100
-@@ -45,7 +45,7 @@
- {}
- 
- 
--CViewNotices::CViewNotices(wxNotebook* pNotebook) :
-+CViewNotices::CViewNotices(wxNotebook* const pNotebook) :
-     CBOINCBaseView(pNotebook)
- {
-     //
-@@ -72,38 +72,38 @@
- }
- 
- 
--wxString& CViewNotices::GetViewName() {
-+wxString& CViewNotices::GetViewName() const {
-     static wxString strViewName(wxT("Notices"));
-     return strViewName;
- }
- 
- 
--wxString& CViewNotices::GetViewDisplayName() {
-+wxString& CViewNotices::GetViewDisplayName() const {
-     static wxString strViewName(_("Notices"));
-     return strViewName;
- }
- 
- 
--const char** CViewNotices::GetViewIcon() {
-+const char** CViewNotices::GetViewIcon() const {
-     return mess_xpm;
- }
- 
- 
--const int CViewNotices::GetViewRefreshRate() {
-+int CViewNotices::GetViewRefreshRate() const {
-     return 10;
- }
- 
--const int CViewNotices::GetViewCurrentViewPage() {
-+int CViewNotices::GetViewCurrentViewPage() const {
-      return VW_NOTIF;
- }
- 
- 
--bool CViewNotices::OnSaveState(wxConfigBase* WXUNUSED(pConfig)) {
-+bool CViewNotices::OnSaveState(wxConfigBase* const WXUNUSED(pConfig)) {
-     return true;
- }
- 
- 
--bool CViewNotices::OnRestoreState(wxConfigBase* WXUNUSED(pConfig)) {
-+bool CViewNotices::OnRestoreState(wxConfigBase* const WXUNUSED(pConfig)) {
-     return true;
- }
- 
-Index: boinc/clientgui/ViewNotices.h
-===================================================================
---- boinc.orig/clientgui/ViewNotices.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewNotices.h	2011-11-25 00:46:49.000000000 +0100
-@@ -35,21 +35,21 @@
- 
- public:
-     CViewNotices();
--    CViewNotices(wxNotebook* pNotebook);
-+    CViewNotices(wxNotebook* const pNotebook);
- 
-     ~CViewNotices();
- 
--    virtual wxString&       GetViewName();
--    virtual wxString&       GetViewDisplayName();
--    virtual const char**    GetViewIcon();
--    virtual const int       GetViewRefreshRate();
--    virtual const int       GetViewCurrentViewPage();
-+    virtual wxString&       GetViewName() const;
-+    virtual wxString&       GetViewDisplayName() const;
-+    virtual const char**    GetViewIcon() const;
-+    virtual int             GetViewRefreshRate() const;
-+    virtual int             GetViewCurrentViewPage() const;
- 
- protected:
- 	CNoticeListCtrl*        m_pHtmlListPane;
- 
--    virtual bool            OnSaveState( wxConfigBase* pConfig );
--    virtual bool            OnRestoreState( wxConfigBase* pConfig );
-+    virtual bool            OnSaveState( wxConfigBase* const pConfig );
-+    virtual bool            OnRestoreState( wxConfigBase* const pConfig );
- 
-     virtual void            OnListRender( wxTimerEvent& event );
-     void                    OnLinkClicked( NoticeListCtrlEvent& event );
-Index: boinc/clientgui/ViewProjects.cpp
-===================================================================
---- boinc.orig/clientgui/ViewProjects.cpp	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewProjects.cpp	2011-11-25 22:40:47.000000000 +0100
-@@ -91,7 +91,7 @@
- 
- static CViewProjects* myCViewProjects;
- 
--static bool CompareViewProjectsItems(int iRowIndex1, int iRowIndex2) {
-+static bool CompareViewProjectsItems(const int iRowIndex1, const int iRowIndex2) {
-     CProject*   project1;
-     CProject*   project2;
-     int         result = 0;
-@@ -153,7 +153,7 @@
- {}
- 
- 
--CViewProjects::CViewProjects(wxNotebook* pNotebook) :
-+CViewProjects::CViewProjects(wxNotebook* const pNotebook) :
-     CBOINCBaseView(pNotebook, ID_TASK_PROJECTSVIEW, DEFAULT_TASK_FLAGS, ID_LIST_PROJECTSVIEW, DEFAULT_LIST_MULTI_SEL_FLAGS)
- {
-     CTaskItemGroup* pGroup = NULL;
-@@ -239,29 +239,29 @@
- }
- 
- 
--wxString& CViewProjects::GetViewName() {
-+wxString& CViewProjects::GetViewName() const {
-     static wxString strViewName(wxT("Projects"));
-     return strViewName;
- }
- 
- 
--wxString& CViewProjects::GetViewDisplayName() {
-+wxString& CViewProjects::GetViewDisplayName() const {
-     static wxString strViewName(_("Projects"));
-     return strViewName;
- }
- 
- 
--const char** CViewProjects::GetViewIcon() {
-+const char** CViewProjects::GetViewIcon() const {
-     return proj_xpm;
- }
- 
- 
--const int CViewProjects::GetViewCurrentViewPage() {
-+int CViewProjects::GetViewCurrentViewPage() const {
-     return VW_PROJ;
- }
- 
- 
--wxString CViewProjects::GetKeyValue1(int iRowIndex) {
-+wxString CViewProjects::GetKeyValue1(const int iRowIndex) const {
-     CProject*   project;
-     
-     if (GetProjectCacheAtIndex(project, m_iSortedIndexes[iRowIndex])) {
-@@ -272,7 +272,7 @@
- }
- 
- 
--int CViewProjects::FindRowIndexByKeyValues(wxString& key1, wxString&) {
-+int CViewProjects::FindRowIndexByKeyValues(const wxString& key1, const wxString&) const {
-     CProject* project;
-     unsigned int iRowIndex, n = GetCacheCount();
-     for(iRowIndex=0; iRowIndex < n; iRowIndex++) {
-@@ -564,7 +564,7 @@
- }
- 
- 
--wxString CViewProjects::OnListGetItemText(long item, long column) const {
-+wxString CViewProjects::OnListGetItemText(const long item, const long column) const {
-     CProject* project     = NULL;
-     wxString       strBuffer = wxEmptyString;
- 
-@@ -632,7 +632,7 @@
- }
- 
- 
--wxInt32 CViewProjects::GetCacheCount() {
-+wxInt32 CViewProjects::GetCacheCount() const {
-     return (wxInt32)m_ProjectCache.size();
- }
- 
-@@ -649,7 +649,7 @@
- }
- 
- 
--bool CViewProjects::IsSelectionManagementNeeded() {
-+bool CViewProjects::IsSelectionManagementNeeded() const {
-     return true;
- }
- 
-@@ -770,7 +770,7 @@
- }
- 
- 
--bool CViewProjects::SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex) {
-+bool CViewProjects::SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex) {
-     wxString    strDocumentText  = wxEmptyString;
-     wxString    strDocumentText2 = wxEmptyString;
-     float       fDocumentFloat = 0.0;
-@@ -853,7 +853,7 @@
- }
- 
- 
--void CViewProjects::GetDocProjectName(wxInt32 item, wxString& strBuffer) const {
-+void CViewProjects::GetDocProjectName(const wxInt32 item, wxString& strBuffer) const {
-     PROJECT* project = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     std::string project_name;
-@@ -871,7 +871,7 @@
- }
- 
- 
--wxInt32 CViewProjects::FormatProjectName(wxInt32 item, wxString& strBuffer) const {
-+wxInt32 CViewProjects::FormatProjectName(const wxInt32 item, wxString& strBuffer) const {
-     CProject* project;
-     
-     try {
-@@ -890,7 +890,7 @@
- }
- 
- 
--void CViewProjects::GetDocAccountName(wxInt32 item, wxString& strBuffer) const {
-+void CViewProjects::GetDocAccountName(const wxInt32 item, wxString& strBuffer) const {
-     PROJECT* project = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
-@@ -906,7 +906,7 @@
- }
- 
- 
--wxInt32 CViewProjects::FormatAccountName(wxInt32 item, wxString& strBuffer) const {
-+wxInt32 CViewProjects::FormatAccountName(const wxInt32 item, wxString& strBuffer) const {
-     CProject* project;
-     
-     try {
-@@ -924,7 +924,7 @@
- }
- 
- 
--void CViewProjects::GetDocTeamName(wxInt32 item, wxString& strBuffer) const {
-+void CViewProjects::GetDocTeamName(const wxInt32 item, wxString& strBuffer) const {
-     PROJECT* project = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
-@@ -940,7 +940,7 @@
- }
- 
- 
--wxInt32 CViewProjects::FormatTeamName(wxInt32 item, wxString& strBuffer) const {
-+wxInt32 CViewProjects::FormatTeamName(const wxInt32 item, wxString& strBuffer) const {
-     CProject* project;
-     
-     try {
-@@ -959,7 +959,7 @@
- }
- 
- 
--void CViewProjects::GetDocTotalCredit(wxInt32 item, float& fBuffer) const {
-+void CViewProjects::GetDocTotalCredit(const wxInt32 item, float& fBuffer) const {
-     PROJECT* project = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
-@@ -975,14 +975,14 @@
- }
- 
- 
--wxInt32 CViewProjects::FormatTotalCredit(float fBuffer, wxString& strBuffer) const {
-+wxInt32 CViewProjects::FormatTotalCredit(const float fBuffer, wxString& strBuffer) const {
-     strBuffer.Printf(wxT("%0.2f"), fBuffer);
- 
-     return 0;
- }
- 
- 
--void CViewProjects::GetDocAVGCredit(wxInt32 item, float& fBuffer) const {
-+void CViewProjects::GetDocAVGCredit(const wxInt32 item, float& fBuffer) const {
-     PROJECT* project = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
-@@ -998,14 +998,14 @@
- }
- 
- 
--wxInt32 CViewProjects::FormatAVGCredit(float fBuffer, wxString& strBuffer) const {
-+wxInt32 CViewProjects::FormatAVGCredit(const float fBuffer, wxString& strBuffer) const {
-     strBuffer.Printf(wxT("%0.2f"), fBuffer);
- 
-     return 0;
- }
- 
- 
--void CViewProjects::GetDocResourceShare(wxInt32 item, float& fBuffer) const {
-+void CViewProjects::GetDocResourceShare(const wxInt32 item, float& fBuffer) const {
-     PROJECT* project = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
-@@ -1021,7 +1021,7 @@
- }
- 
- 
--void CViewProjects::GetDocResourcePercent(wxInt32 item, float& fBuffer) const {
-+void CViewProjects::GetDocResourcePercent(const wxInt32 item, float& fBuffer) const {
-     PROJECT* project = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
-@@ -1037,13 +1037,13 @@
- }
- 
- 
--wxInt32 CViewProjects::FormatResourceShare(float fBuffer, float fBufferPercent, wxString& strBuffer) const {
-+wxInt32 CViewProjects::FormatResourceShare(const float fBuffer, const float fBufferPercent, wxString& strBuffer) const {
-     strBuffer.Printf(wxT("%0.0f (%0.2f%%)"), fBuffer, fBufferPercent);
-         
-     return 0;
- }
- 
--wxString rpc_reason_string_translated(int reason) {
-+wxString rpc_reason_string_translated(const int reason) {
-     switch (reason) {
-     case RPC_REASON_USER_REQ: return _("Requested by user");
-     case RPC_REASON_NEED_WORK: return _("To fetch work");
-@@ -1056,7 +1056,7 @@
-     }
- }
- 
--void CViewProjects::GetDocStatus(wxInt32 item, wxString& strBuffer) const {
-+void CViewProjects::GetDocStatus(const wxInt32 item, wxString& strBuffer) const {
-     PROJECT* project = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
-@@ -1099,7 +1099,7 @@
- }
- 
- 
--wxInt32 CViewProjects::FormatStatus(wxInt32 item, wxString& strBuffer) const {
-+wxInt32 CViewProjects::FormatStatus(const wxInt32 item, wxString& strBuffer) const {
-     CProject* project;
-     
-     try {
-@@ -1118,7 +1118,7 @@
- }
- 
- 
--void CViewProjects::GetDocProjectURL(wxInt32 item, wxString& strBuffer) const {
-+void CViewProjects::GetDocProjectURL(const wxInt32 item, wxString& strBuffer) const {
-     PROJECT* project = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
-@@ -1134,7 +1134,7 @@
- }
- 
- 
--double CViewProjects::GetProgressValue(long item) {
-+double CViewProjects::GetProgressValue(const long item) const {
-     CProject* project;
- 
-     try {
-@@ -1151,7 +1151,7 @@
- }
- 
- 
--wxString CViewProjects::GetProgressText( long item) {
-+wxString CViewProjects::GetProgressText(const long item) const {
-     CProject* project     = NULL;
-     wxString       strBuffer = wxEmptyString;
- 
-@@ -1178,7 +1178,7 @@
- }
- 
- 
--wxInt32 CViewProjects::ConvertWebsiteIndexToLink(wxInt32 iProjectIndex, wxInt32 iWebsiteIndex, wxString& strLink) {
-+wxInt32 CViewProjects::ConvertWebsiteIndexToLink(const wxInt32 iProjectIndex, const wxInt32 iWebsiteIndex, wxString& strLink) {
-     strLink.Printf(wxT("web:%d:%d"), iProjectIndex, iWebsiteIndex);
-     return 0;
- }
-@@ -1202,7 +1202,7 @@
- }
- 
- 
--int CViewProjects::GetProjectCacheAtIndex(CProject*& projectPtr, int index) {
-+int CViewProjects::GetProjectCacheAtIndex(CProject*& projectPtr, const int index) const {
-     try {
-         projectPtr = m_ProjectCache.at(index);
-     } catch ( std::out_of_range ) {
-Index: boinc/clientgui/ViewProjects.h
-===================================================================
---- boinc.orig/clientgui/ViewProjects.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewProjects.h	2011-11-25 22:29:20.000000000 +0100
-@@ -57,13 +57,13 @@
- 
-     ~CViewProjects();
- 
--    virtual wxString&       GetViewName();
--    virtual wxString&       GetViewDisplayName();
--    virtual const char**    GetViewIcon();
--    virtual const int       GetViewCurrentViewPage();
-+    virtual wxString&       GetViewName() const;
-+    virtual wxString&       GetViewDisplayName() const;
-+    virtual const char**    GetViewIcon() const;
-+    virtual int             GetViewCurrentViewPage() const;
- 
--    virtual wxString        GetKeyValue1(int iRowIndex);
--    virtual int             FindRowIndexByKeyValues(wxString& key1, wxString& key2);
-+    virtual wxString        GetKeyValue1(const int iRowIndex) const;
-+    virtual int             FindRowIndexByKeyValues(const wxString& key1, const wxString& key2) const;
- 
-     void                    OnProjectUpdate( wxCommandEvent& event );
-     void                    OnProjectSuspend( wxCommandEvent& event );
-@@ -79,42 +79,42 @@
- protected:
-     virtual wxInt32         GetDocCount();
- 
--    virtual wxString        OnListGetItemText( long item, long column ) const;
-+    virtual wxString        OnListGetItemText(const long item,const long column ) const;
-     virtual wxInt32         AddCacheElement();
-     virtual wxInt32         EmptyCache();
--    virtual wxInt32         GetCacheCount();
-+    virtual wxInt32         GetCacheCount() const;
-     virtual wxInt32         RemoveCacheElement();
--    virtual bool            SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex);
-+    virtual bool            SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex);
- 
--    virtual bool            IsSelectionManagementNeeded();
-+    virtual bool            IsSelectionManagementNeeded() const;
- 
-     virtual void            UpdateSelection();
- 
--    void                    GetDocProjectName(wxInt32 item, wxString& strBuffer) const;
--    wxInt32                 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
--    void                    GetDocAccountName(wxInt32 item, wxString& strBuffer) const;
--    wxInt32                 FormatAccountName( wxInt32 item, wxString& strBuffer ) const;
--    void                    GetDocTeamName(wxInt32 item, wxString& strBuffer) const;
--    wxInt32                 FormatTeamName( wxInt32 item, wxString& strBuffer ) const;
--    void                    GetDocTotalCredit(wxInt32 item, float& fBuffer) const;
--    wxInt32                 FormatTotalCredit( float fBuffer, wxString& strBuffer ) const;
--    void                    GetDocAVGCredit(wxInt32 item, float& fBuffer) const;
--    wxInt32                 FormatAVGCredit( float fBuffer, wxString& strBuffer ) const;
--    void                    GetDocResourceShare(wxInt32 item, float& fBuffer) const;
--    void                    GetDocResourcePercent(wxInt32 item, float& fBuffer) const;
--    wxInt32                 FormatResourceShare( float fBuffer, float fBufferPercent, wxString& strBuffer ) const;
--    void                    GetDocStatus(wxInt32 item, wxString& strBuffer) const;
--    wxInt32                 FormatStatus( wxInt32 item, wxString& strBuffer ) const;
--    void                    GetDocProjectURL(wxInt32 item, wxString& strBuffer) const;
-+    void                    GetDocProjectName(const wxInt32 item, wxString& strBuffer) const;
-+    wxInt32                 FormatProjectName(const wxInt32 item, wxString& strBuffer ) const;
-+    void                    GetDocAccountName(const wxInt32 item, wxString& strBuffer) const;
-+    wxInt32                 FormatAccountName(const  wxInt32 item, wxString& strBuffer ) const;
-+    void                    GetDocTeamName(const wxInt32 item, wxString& strBuffer) const;
-+    wxInt32                 FormatTeamName(const  wxInt32 item, wxString& strBuffer ) const;
-+    void                    GetDocTotalCredit(const wxInt32 item, float& fBuffer) const;
-+    wxInt32                 FormatTotalCredit(const float fBuffer, wxString& strBuffer ) const;
-+    void                    GetDocAVGCredit(const wxInt32 item, float& fBuffer) const;
-+    wxInt32                 FormatAVGCredit(const float fBuffer, wxString& strBuffer ) const;
-+    void                    GetDocResourceShare(const wxInt32 item, float& fBuffer) const;
-+    void                    GetDocResourcePercent(const wxInt32 item, float& fBuffer) const;
-+    wxInt32                 FormatResourceShare(const float fBuffer, const float fBufferPercent, wxString& strBuffer ) const;
-+    void                    GetDocStatus(const wxInt32 item, wxString& strBuffer) const;
-+    wxInt32                 FormatStatus(const  wxInt32 item, wxString& strBuffer ) const;
-+    void                    GetDocProjectURL(const wxInt32 item, wxString& strBuffer) const;
- 
--    virtual double          GetProgressValue(long item);
--    virtual wxString        GetProgressText( long item);
-+    virtual double          GetProgressValue(const long item) const;
-+    virtual wxString        GetProgressText(const  long item) const;
- 
-     bool                    IsWebsiteLink( const wxString& strLink );
--    wxInt32                 ConvertWebsiteIndexToLink( wxInt32 iProjectIndex, wxInt32 iWebsiteIndex, wxString& strLink );
-+    wxInt32                 ConvertWebsiteIndexToLink(const wxInt32 iProjectIndex, const wxInt32 iWebsiteIndex, wxString& strLink );
-     wxInt32                 ConvertLinkToWebsiteIndex( const wxString& strLink, wxInt32& iProjectIndex, wxInt32& iWebsiteIndex );
- 
--    int                     GetProjectCacheAtIndex(CProject*& projectPtr, int index);
-+    int                     GetProjectCacheAtIndex(CProject*& projectPtr, const int index) const;
- 
-     DECLARE_EVENT_TABLE()
- };
-Index: boinc/clientgui/ViewResources.cpp
-===================================================================
---- boinc.orig/clientgui/ViewResources.cpp	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewResources.cpp	2011-11-25 21:57:13.000000000 +0100
-@@ -42,7 +42,7 @@
- CViewResources::CViewResources()
- {}
- 
--CViewResources::CViewResources(wxNotebook* pNotebook) :
-+CViewResources::CViewResources(wxNotebook* const pNotebook) :
- 	CBOINCBaseView(pNotebook)
- {
- 	m_BOINCwasEmpty=false;
-@@ -108,29 +108,29 @@
- }
- 
- 
--wxString& CViewResources::GetViewName() {
-+wxString& CViewResources::GetViewName() const {
-     static wxString strViewName(wxT("Disk"));
-     return strViewName;
- }
- 
- 
--wxString& CViewResources::GetViewDisplayName() {
-+wxString& CViewResources::GetViewDisplayName() const {
-     static wxString strViewName(_("Disk"));
-     return strViewName;
- }
- 
- 
--const char** CViewResources::GetViewIcon() {
-+const char** CViewResources::GetViewIcon() const {
-     return usage_xpm;
- }
- 
- 
--const int CViewResources::GetViewRefreshRate() {
-+int CViewResources::GetViewRefreshRate() const {
-     return 10;
- }
- 
- 
--const int CViewResources::GetViewCurrentViewPage() {
-+int CViewResources::GetViewCurrentViewPage() const {
-     return VW_DISK;
- }
- 
-@@ -140,7 +140,7 @@
- }
- 
- 
--wxInt32 CViewResources::FormatProjectName(PROJECT* project, wxString& strBuffer) const {
-+wxInt32 CViewResources::FormatProjectName(const PROJECT* const project, wxString& strBuffer) const {
-     CMainDocument* doc = wxGetApp().GetDocument();
-     std::string project_name;
- 
-@@ -159,11 +159,11 @@
- }
- 
- 
--bool CViewResources::OnSaveState(wxConfigBase* /*pConfig*/) {
-+bool CViewResources::OnSaveState(wxConfigBase* const WXUNUSED(pConfig)) {
-     return true;
- }
- 
--bool CViewResources::OnRestoreState(wxConfigBase* /*pConfig*/) {
-+bool CViewResources::OnRestoreState(wxConfigBase* const WXUNUSED(pConfig)) {
-     return true;
- }
- 
-@@ -310,7 +310,7 @@
- 	}
- }
- 
--wxInt32 CViewResources::FormatDiskSpace(double bytes, wxString& strBuffer) const {
-+wxInt32 CViewResources::FormatDiskSpace(const double bytes, wxString& strBuffer) const {
-     double         xTera = 1099511627776.0;
-     double         xGiga = 1073741824.0;
-     double         xMega = 1048576.0;
-Index: boinc/clientgui/ViewResources.h
-===================================================================
---- boinc.orig/clientgui/ViewResources.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewResources.h	2011-11-25 00:48:51.000000000 +0100
-@@ -36,15 +36,15 @@
- 
- public:
-     CViewResources();
--    CViewResources(wxNotebook* pNotebook);
-+    CViewResources(wxNotebook* const pNotebook);
- 
-     ~CViewResources();
- 
--    virtual wxString&       GetViewName();
--    virtual wxString&       GetViewDisplayName();
--    virtual const char**    GetViewIcon();
--    virtual const int       GetViewRefreshRate();
--    virtual const int       GetViewCurrentViewPage();
-+    virtual wxString&       GetViewName() const;
-+    virtual wxString&       GetViewDisplayName() const;
-+    virtual const char**    GetViewIcon() const;
-+    virtual int             GetViewRefreshRate() const;
-+    virtual int             GetViewCurrentViewPage() const;
- 
- protected:
- 
-@@ -55,12 +55,12 @@
- 
-     virtual void            UpdateSelection();
- 
--    wxInt32                 FormatProjectName(PROJECT*, wxString& strBuffer ) const;
--	wxInt32					FormatDiskSpace(double bytes, wxString& strBuffer) const;
-+    wxInt32                 FormatProjectName(const PROJECT* const project, wxString& strBuffer ) const;
-+    wxInt32                 FormatDiskSpace(const double bytes, wxString& strBuffer) const;
- 
--    virtual bool            OnSaveState( wxConfigBase* pConfig );
--    virtual bool            OnRestoreState( wxConfigBase* pConfig );
--	virtual void            OnListRender( wxTimerEvent& event );
-+    virtual bool            OnSaveState( wxConfigBase* const pConfig );
-+    virtual bool            OnRestoreState( wxConfigBase* const pConfig );
-+    virtual void            OnListRender( wxTimerEvent& event );
- };
- 
- 
-Index: boinc/clientgui/ViewStatistics.cpp
-===================================================================
---- boinc.orig/clientgui/ViewStatistics.cpp	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewStatistics.cpp	2011-11-25 21:58:38.000000000 +0100
-@@ -68,7 +68,7 @@
- // Set USE_MEMORYDC FALSE to aid debugging
- #define USE_MEMORYDC TRUE
- 
--CPaintStatistics::CPaintStatistics(wxWindow* parent, wxWindowID id, const wxPoint& pos,	const wxSize& size, long style, const wxString& name
-+CPaintStatistics::CPaintStatistics(wxWindow* const parent, const wxWindowID id, const wxPoint& pos,	const wxSize& size, long style, const wxString& name
- ): wxWindow(parent, id, pos, size, style, name)
- {	m_font_standart = *wxSWISS_FONT;
- 	m_font_bold = *wxSWISS_FONT;
-@@ -208,7 +208,7 @@
- }
- 
- 
--static void getTypePoint(int &typePoint, int number) {typePoint = number / 10;}
-+static void getTypePoint(int &typePoint, const int number) {typePoint = number / 10;}
- 
- static bool CrossTwoLine(const double X1_1, const double Y1_1, const double X1_2, const double Y1_2, 
- 						 const double X2_1, const double Y2_1, const double X2_2, const double Y2_2, 
-@@ -231,7 +231,7 @@
- 	}
- }
- 
--void CPaintStatistics::getDrawColour(wxColour &graphColour, int number) {
-+void CPaintStatistics::getDrawColour(wxColour &graphColour, const int number) {
- 	switch (number % 10){
- 	case 1:	graphColour = m_pen_GraphColour01;	break;
- 	case 2:	graphColour = m_pen_GraphColour02;	break;
-@@ -417,7 +417,7 @@
- 	if (m_WorkSpace_Y_start < 0.0) m_WorkSpace_Y_start = 0.0;
- }
- //----Draw Project Head----
--void CPaintStatistics::DrawProjectHead(wxDC &dc, PROJECT* project1, const wxString head_name_last){
-+void CPaintStatistics::DrawProjectHead(wxDC &dc, const PROJECT* const project1, const wxString head_name_last){
- 	wxCoord w_temp = 0, h_temp = 0, des_temp = 0, lead_temp = 0;
- 	wxString head_name = wxT("");
- 	wxCoord x0 = 0;
-@@ -485,7 +485,7 @@
- 	}
- }
- //----Draw Legend----
--void CPaintStatistics::DrawLegend(wxDC &dc, PROJECTS* proj, CMainDocument* pDoc, int SelProj, bool bColour, int &m_Legend_Shift){
-+void CPaintStatistics::DrawLegend(wxDC &dc, PROJECTS* proj, const CMainDocument* const pDoc, int SelProj, bool bColour, int &m_Legend_Shift){
- 	wxString head_name = wxT("0");
- 	wxCoord project_name_max_width = 0;
- 	const double radius1 = 5;
-@@ -1931,7 +1931,7 @@
- CViewStatistics::CViewStatistics()
- {}
- 
--CViewStatistics::CViewStatistics(wxNotebook* pNotebook) :
-+CViewStatistics::CViewStatistics(wxNotebook* const pNotebook) :
-     CBOINCBaseView(pNotebook) 
- {
- 	CTaskItemGroup* pGroup = NULL;
-@@ -2061,25 +2061,25 @@
- #endif
- }
- 
--wxString& CViewStatistics::GetViewName() {
-+wxString& CViewStatistics::GetViewName() const {
-     static wxString strViewName(wxT("Statistics"));
-     return strViewName;
- }
- 
--wxString& CViewStatistics::GetViewDisplayName() {
-+wxString& CViewStatistics::GetViewDisplayName() const {
-     static wxString strViewName(_("Statistics"));
-     return strViewName;
- }
- 
--const char** CViewStatistics::GetViewIcon() {
-+const char** CViewStatistics::GetViewIcon() const {
-     return stats_xpm;
- }
- 
--const int CViewStatistics::GetViewRefreshRate() {
-+int CViewStatistics::GetViewRefreshRate() const {
-     return 60;
- }
- 
--const int CViewStatistics::GetViewCurrentViewPage() {
-+int CViewStatistics::GetViewCurrentViewPage() const {
-     return VW_STAT;
- }
- 
-@@ -2311,7 +2311,7 @@
-     wxLogTrace(wxT("Function Start/End"), wxT("CViewStatistics::OnShowHideProjectList - Function End"));
- }
- 
--bool CViewStatistics::OnSaveState(wxConfigBase* pConfig) {
-+bool CViewStatistics::OnSaveState(wxConfigBase* const pConfig) {
-     bool bReturnValue = true;
- 
-     wxASSERT(pConfig);
-@@ -2339,7 +2339,7 @@
-     return bReturnValue;
- }
- 
--bool CViewStatistics::OnRestoreState(wxConfigBase* pConfig) {
-+bool CViewStatistics::OnRestoreState(wxConfigBase* const pConfig) {
- 	wxASSERT(pConfig);
-     wxASSERT(m_pTaskPane);
- 
-Index: boinc/clientgui/ViewStatistics.h
-===================================================================
---- boinc.orig/clientgui/ViewStatistics.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewStatistics.h	2011-11-25 21:58:52.000000000 +0100
-@@ -29,15 +29,15 @@
- {
- public:
- 	CPaintStatistics();
--	CPaintStatistics(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel"));
-+	CPaintStatistics(wxWindow* const parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel"));
- 	
-     ~CPaintStatistics();
-     
- 	void DrawMainHead(wxDC &dc, const wxString head_name);
- 	
--	void DrawProjectHead(wxDC &dc, PROJECT* project1, const wxString head_name_last);
-+	void DrawProjectHead(wxDC &dc, const PROJECT* const project1, const wxString head_name_last);
- 
--	void DrawLegend(wxDC &dc, PROJECTS* proj, CMainDocument* pDoc, int SelProj, bool bColour, int &m_Legend_Shift);
-+	void DrawLegend(wxDC &dc, PROJECTS* proj, const CMainDocument* const pDoc, int SelProj, bool bColour, int &m_Legend_Shift);
- 	
- 	void DrawAxis(wxDC &dc, const double max_val_y, const double min_val_y, const double max_val_x, const double min_val_x, wxColour pen_AxisColour, const double max_val_y_all, const double min_val_y_all);
- 	
-@@ -47,7 +47,7 @@
- 	
- 	void DrawMarker(wxDC &dc);
- 
--	void getDrawColour(wxColour &graphColour, int number);
-+	void getDrawColour(wxColour &graphColour, const int number);
- 
- 	void ClearXY();
- 
-@@ -218,15 +218,15 @@
- 
- public:
-     CViewStatistics();
--    CViewStatistics(wxNotebook* pNotebook);
-+    CViewStatistics(wxNotebook* const pNotebook);
- 
-     ~CViewStatistics();
- 
--    virtual wxString&       GetViewName();
--    virtual wxString&       GetViewDisplayName();
--    virtual const char**    GetViewIcon();
--    virtual const int       GetViewRefreshRate();
--    virtual const int       GetViewCurrentViewPage();
-+    virtual wxString&       GetViewName() const;
-+    virtual wxString&       GetViewDisplayName() const;
-+    virtual const char**    GetViewIcon() const;
-+    virtual int             GetViewRefreshRate() const;
-+    virtual int             GetViewCurrentViewPage() const;
- 
-     void                    OnStatisticsUserTotal( wxCommandEvent& event );
-     void                    OnStatisticsUserAverage( wxCommandEvent& event );
-@@ -251,8 +251,8 @@
-     EventHandlerRef         m_pStatisticsAccessibilityEventHandlerRef;
- #endif
- 
--    virtual bool            OnSaveState( wxConfigBase* pConfig );
--    virtual bool            OnRestoreState( wxConfigBase* pConfig );
-+    virtual bool            OnSaveState( wxConfigBase* const pConfig );
-+    virtual bool            OnRestoreState( wxConfigBase* const pConfig );
- 
-     virtual void            OnListRender( wxTimerEvent& event );
- 
-Index: boinc/clientgui/ViewTransfers.cpp
-===================================================================
---- boinc.orig/clientgui/ViewTransfers.cpp	2011-10-08 14:11:56.000000000 +0200
-+++ boinc/clientgui/ViewTransfers.cpp	2011-11-25 22:24:40.000000000 +0100
-@@ -77,7 +77,7 @@
- 
- static CViewTransfers* MyCViewTransfers;
- 
--static bool CompareViewTransferItems(int iRowIndex1, int iRowIndex2) {
-+static bool CompareViewTransferItems(const int iRowIndex1, const int iRowIndex2) {
-     CTransfer*      transfer1;
-     CTransfer*      transfer2;
-     int             result = 0;
-@@ -143,7 +143,7 @@
- {}
- 
- 
--CViewTransfers::CViewTransfers(wxNotebook* pNotebook) :
-+CViewTransfers::CViewTransfers(wxNotebook* const pNotebook) :
-     CBOINCBaseView(pNotebook, ID_TASK_TRANSFERSVIEW, DEFAULT_TASK_FLAGS, ID_LIST_TRANSFERSVIEW, DEFAULT_LIST_MULTI_SEL_FLAGS)
- {
- 	CTaskItemGroup* pGroup = NULL;
-@@ -202,29 +202,29 @@
- }
- 
- 
--wxString& CViewTransfers::GetViewName() {
-+wxString& CViewTransfers::GetViewName() const {
-     static wxString strViewName(wxT("Transfers"));
-     return strViewName;
- }
- 
- 
--wxString& CViewTransfers::GetViewDisplayName() {
-+wxString& CViewTransfers::GetViewDisplayName() const {
-     static wxString strViewName(_("Transfers"));
-     return strViewName;
- }
- 
- 
--const char** CViewTransfers::GetViewIcon() {
-+const char** CViewTransfers::GetViewIcon() const {
-     return xfer_xpm;
- }
- 
- 
--const int CViewTransfers::GetViewCurrentViewPage() {
-+int CViewTransfers::GetViewCurrentViewPage() const {
-     return VW_XFER;
- }
- 
- 
--wxString CViewTransfers::GetKeyValue1(int iRowIndex) {
-+wxString CViewTransfers::GetKeyValue1(const int iRowIndex) const {
-     CTransfer*  transfer;
-     
-     if (GetTransferCacheAtIndex(transfer, m_iSortedIndexes[iRowIndex])) {
-@@ -235,7 +235,7 @@
- }
- 
- 
--wxString CViewTransfers::GetKeyValue2(int iRowIndex) {
-+wxString CViewTransfers::GetKeyValue2(const int iRowIndex) const {
-     CTransfer*  transfer;
-     
-     if (GetTransferCacheAtIndex(transfer, m_iSortedIndexes[iRowIndex])) {
-@@ -246,7 +246,7 @@
- }
- 
- 
--int CViewTransfers::FindRowIndexByKeyValues(wxString& key1, wxString& key2) {
-+int CViewTransfers::FindRowIndexByKeyValues(const wxString& key1, const wxString& key2) const {
-     CTransfer*  transfer;
-     unsigned int iRowIndex, n = GetCacheCount();
- 	for(iRowIndex=0; iRowIndex < n; iRowIndex++) {
-@@ -369,7 +369,7 @@
- }
- 
- 
--wxString CViewTransfers::OnListGetItemText(long item, long column) const {
-+wxString CViewTransfers::OnListGetItemText(const long item, const long column) const {
-     CTransfer* transfer;
-     wxString   strBuffer  = wxEmptyString;
- 
-@@ -437,7 +437,7 @@
- }
- 
- 
--wxInt32 CViewTransfers::GetCacheCount() {
-+wxInt32 CViewTransfers::GetCacheCount() const {
-     return (wxInt32)m_TransferCache.size();
- }
- 
-@@ -454,7 +454,7 @@
- }
- 
- 
--bool CViewTransfers::IsSelectionManagementNeeded() {
-+bool CViewTransfers::IsSelectionManagementNeeded() const {
-     return true;
- }
- 
-@@ -474,7 +474,7 @@
- }
- 
- 
--bool CViewTransfers::SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex) {
-+bool CViewTransfers::SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex) {
-     wxString    strDocumentText  = wxEmptyString;
-     wxString    strDocumentText2 = wxEmptyString;
-     float       fDocumentFloat = 0.0;
-@@ -554,47 +554,48 @@
- }
- 
- 
--void CViewTransfers::GetDocProjectName(wxInt32 item, wxString& strBuffer) const {
-+int CViewTransfers::GetDocProjectName(const wxInt32 item, wxString& strBuffer) const {
-     FILE_TRANSFER* transfer = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
--    if (pDoc) {
--        transfer = pDoc->file_transfer(item);
--    }
-+    if (!pDoc) return -1;
-+    transfer = pDoc->file_transfer(item);
- 
-     if (transfer) {
-         strBuffer = HtmlEntityDecode(wxString(transfer->project_name.c_str(), wxConvUTF8));
-     } else {
-         strBuffer = wxEmptyString;
-     }
-+
-+    return 0;
- }
- 
- 
--void CViewTransfers::GetDocFileName(wxInt32 item, wxString& strBuffer) const {
-+int CViewTransfers::GetDocFileName(const wxInt32 item, wxString& strBuffer) const {
-     FILE_TRANSFER* transfer = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
--    if (pDoc) {
--        transfer = pDoc->file_transfer(item);
--    }
-+    if (!pDoc) return -1;
-+    transfer = pDoc->file_transfer(item);
- 
-     if (transfer) {
-         strBuffer = wxString(transfer->name.c_str(), wxConvUTF8);
-     } else {
-         strBuffer = wxEmptyString;
-     }
-+
-+    return 0;
- }
- 
- 
--void CViewTransfers::GetDocProgress(wxInt32 item, float& fBuffer) const {
-+int CViewTransfers::GetDocProgress(const wxInt32 item, float& fBuffer) const {
-     float          fBytesSent = 0;
-     float          fFileSize = 0;
-     FILE_TRANSFER* transfer = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
--    if (pDoc) {
--        transfer = pDoc->file_transfer(item);
--    }
-+    if (!pDoc) return -1;
-+    transfer = pDoc->file_transfer(item);
- 
-     fBuffer = 0;
-     if (transfer) {
-@@ -612,48 +613,49 @@
-     if (fFileSize) {
-         fBuffer = floor((fBytesSent / fFileSize) * 10000)/100;
-     }
-+
-+    return 0;
- }
- 
- 
--wxInt32 CViewTransfers::FormatProgress(float fBuffer, wxString& strBuffer) const {
-+wxInt32 CViewTransfers::FormatProgress(const float fBuffer, wxString& strBuffer) const {
-     strBuffer.Printf(wxT("%.2f%%"), fBuffer);
-     return 0;
- }
- 
- 
--void CViewTransfers::GetDocBytesXferred(wxInt32 item, double& fBuffer) const {
-+int CViewTransfers::GetDocBytesXferred(const wxInt32 item, double& fBuffer) const {
-     FILE_TRANSFER* transfer = NULL;
-+    fBuffer = 0.0;
-+
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
--    if (pDoc) {
--        transfer = pDoc->file_transfer(item);
--    }
-+    if (!pDoc) return -1;
-+    transfer = pDoc->file_transfer(item);
- 
--    if (transfer) {
--        fBuffer = transfer->bytes_xferred;
--    } else {
--        fBuffer = 0.0;
--    }
-+    if (!transfer) return -1;
-+    fBuffer = transfer->bytes_xferred;
-+
-+    return 0;
- }
- 
- 
--void CViewTransfers::GetDocTotalBytes(wxInt32 item, double& fBuffer) const {
-+int CViewTransfers::GetDocTotalBytes(const wxInt32 item, double& fBuffer) const {
-     FILE_TRANSFER* transfer = NULL;
-+    fBuffer = 0.0;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
--    if (pDoc) {
--        transfer = pDoc->file_transfer(item);
--    }
-+    if (!pDoc) return -1;
-+    transfer = pDoc->file_transfer(item);
- 
--    if (transfer) {
--        fBuffer = transfer->nbytes;
--    } else {
--        fBuffer = 0.0;
--    }
-+    if (!transfer) return -1;
-+    fBuffer = transfer->nbytes;
-+
-+    return 0;
- }
- 
- 
--wxInt32 CViewTransfers::FormatSize(double fBytesSent, double fFileSize, wxString& strBuffer) const {
-+wxInt32 CViewTransfers::FormatSize(const double fBytesSent, const double fFileSize, wxString& strBuffer) const {
-     double          xTera = 1099511627776.0;
-     double          xGiga = 1073741824.0;
-     double          xMega = 1048576.0;
-@@ -689,23 +691,23 @@
- }
- 
- 
--void CViewTransfers::GetDocTime(wxInt32 item, double& fBuffer) const {
-+int CViewTransfers::GetDocTime(const wxInt32 item, double& fBuffer) const {
-     FILE_TRANSFER* transfer = NULL;
-+    fBuffer = 0.0;
-+
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
--    if (pDoc) {
--        transfer = pDoc->file_transfer(item);
--    }
-+    if (!pDoc) return -1;
-+    transfer = pDoc->file_transfer(item);
- 
--    if (transfer) {
--        fBuffer = transfer->time_so_far;
--    } else {
--        fBuffer = 0.0;
--    }
-+    if (!transfer) return -1;
-+    fBuffer = transfer->time_so_far;
-+
-+    return 0;
- }
- 
- 
--wxInt32 CViewTransfers::FormatTime(double fBuffer, wxString& strBuffer) const {
-+wxInt32 CViewTransfers::FormatTime(const double fBuffer, wxString& strBuffer) const {
-     wxInt32        iHour = 0;
-     wxInt32        iMin = 0;
-     wxInt32        iSec = 0;
-@@ -723,20 +725,20 @@
- }
- 
- 
--void CViewTransfers::GetDocSpeed(wxInt32 item, double& fBuffer) const {
-+int CViewTransfers::GetDocSpeed(const wxInt32 item, double& fBuffer) const {
-     FILE_TRANSFER* transfer = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
--    if (pDoc) {
--        transfer = pDoc->file_transfer(item);
--    }
-+    if (!pDoc) return -1;
-+    transfer = pDoc->file_transfer(item);
- 
--    if (transfer) {
--        if (transfer->xfer_active)
--            fBuffer = transfer->xfer_speed / 1024;
--        else
--            fBuffer = 0.0;
--    }
-+    if (!transfer) return -1;
-+    if (transfer->xfer_active)
-+        fBuffer = transfer->xfer_speed / 1024;
-+    else
-+        fBuffer = 0.0;
-+
-+    return 0;
- }
- 
- 
-@@ -747,21 +749,21 @@
- }
- 
- 
--void CViewTransfers::GetDocStatus(wxInt32 item, wxString& strBuffer) const {
-+int CViewTransfers::GetDocStatus(const wxInt32 item, wxString& strBuffer) const {
-     FILE_TRANSFER* transfer = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     int retval;
-     strBuffer = wxString("", wxConvUTF8);
-     
-     transfer = pDoc->file_transfer(item);
--    if (!transfer) return;
-+    if (!transfer) return -1;
-     CC_STATUS      status;
- 
-     wxASSERT(pDoc);
-     wxASSERT(wxDynamicCast(pDoc, CMainDocument));
- 
-     retval = pDoc->GetCoreClientStatus(status);
--    if (retval) return;
-+    if (retval) return retval;
- 
-     wxDateTime dtNextRequest((time_t)transfer->next_request_time);
-     wxDateTime dtNow(wxDateTime::Now());
-@@ -791,26 +793,27 @@
-         FormatTime(transfer->project_backoff, x);
-         strBuffer += _(" (project backoff: ") + x + _(")");
-     }
-+    return 0;
- }
- 
- 
--void CViewTransfers::GetDocProjectURL(wxInt32 item, wxString& strBuffer) const {
-+int CViewTransfers::GetDocProjectURL(const wxInt32 item, wxString& strBuffer) const {
-     FILE_TRANSFER* transfer = NULL;
-     CMainDocument* pDoc = wxGetApp().GetDocument();
-     
--    if (pDoc) {
--        transfer = pDoc->file_transfer(item);
--    }
-+    if (!pDoc) return -1;
-+    transfer = pDoc->file_transfer(item);
- 
-     wxASSERT(transfer);
- 
--    if (transfer) {
--        strBuffer = wxString(transfer->project_url.c_str(), wxConvUTF8);
--    }
-+    if (!transfer) return -1;
-+    strBuffer = wxString(transfer->project_url.c_str(), wxConvUTF8);
-+
-+    return 0;
- }
- 
- 
--double CViewTransfers::GetProgressValue(long item) {
-+double CViewTransfers::GetProgressValue(const long item) const {
-     double          fBytesSent = 0;
-     double          fFileSize = 0;
-     FILE_TRANSFER* transfer = NULL;
-@@ -838,7 +841,7 @@
- }
- 
- 
--wxString CViewTransfers::GetProgressText( long item) {
-+wxString CViewTransfers::GetProgressText(const long item) const {
-     CTransfer* transfer;
-     wxString   strBuffer  = wxEmptyString;
- 
-@@ -850,7 +853,7 @@
- }
- 
- 
--int CViewTransfers::GetTransferCacheAtIndex(CTransfer*& transferPtr, int index) {
-+int CViewTransfers::GetTransferCacheAtIndex(CTransfer*& transferPtr, const int index) const {
-     try {
-         transferPtr = m_TransferCache.at(index);
-     } catch ( std::out_of_range ) {
-Index: boinc/clientgui/ViewTransfers.h
-===================================================================
---- boinc.orig/clientgui/ViewTransfers.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/ViewTransfers.h	2011-11-25 22:23:13.000000000 +0100
-@@ -52,18 +52,18 @@
- 
- public:
-     CViewTransfers();
--    CViewTransfers(wxNotebook* pNotebook);
-+    CViewTransfers(wxNotebook* const pNotebook);
- 
-     ~CViewTransfers();
- 
--    virtual wxString&       GetViewName();
--    virtual wxString&       GetViewDisplayName();
--    virtual const char**    GetViewIcon();
--    virtual const int       GetViewCurrentViewPage();
--
--    virtual wxString        GetKeyValue1(int iRowIndex);
--    virtual wxString        GetKeyValue2(int iRowIndex);
--    virtual int             FindRowIndexByKeyValues(wxString& key1, wxString& key2);
-+    virtual wxString&       GetViewName() const;
-+    virtual wxString&       GetViewDisplayName() const;
-+    virtual const char**    GetViewIcon() const;
-+    virtual int             GetViewCurrentViewPage() const;
-+
-+    virtual wxString        GetKeyValue1(const int iRowIndex) const;
-+    virtual wxString        GetKeyValue2(const int iRowIndex) const;
-+    virtual int             FindRowIndexByKeyValues(const wxString& key1, const wxString& key2) const;
- 
-     void                    OnTransfersRetryNow( wxCommandEvent& event );
-     void                    OnTransfersAbort( wxCommandEvent& event );
-@@ -73,36 +73,36 @@
- protected:
-     virtual wxInt32         GetDocCount();
- 
--    virtual wxString        OnListGetItemText( long item, long column ) const;
-+    virtual wxString        OnListGetItemText( const long item, const long column ) const;
- 
-     virtual wxInt32         AddCacheElement();
-     virtual wxInt32         EmptyCache();
--    virtual wxInt32         GetCacheCount();
-+    virtual wxInt32         GetCacheCount() const;
-     virtual wxInt32         RemoveCacheElement();
--    virtual bool            SynchronizeCacheItem(wxInt32 iRowIndex, wxInt32 iColumnIndex);
-+    virtual bool            SynchronizeCacheItem(const wxInt32 iRowIndex, const wxInt32 iColumnIndex);
- 
--    virtual bool            IsSelectionManagementNeeded();
-+    virtual bool            IsSelectionManagementNeeded() const;
- 
-     virtual void            UpdateSelection();
- 
--    void                    GetDocProjectName(wxInt32 item, wxString& strBuffer) const;
--    void                    GetDocFileName(wxInt32 item, wxString& strBuffer) const;
--    void                    GetDocProgress(wxInt32 item, float& fBuffer) const;
--    wxInt32                 FormatProgress( float fBuffer, wxString& strBuffer ) const;
--    void                    GetDocBytesXferred(wxInt32 item, double& fBuffer) const;
--    void                    GetDocTotalBytes(wxInt32 item, double& fBuffer) const;
--    wxInt32                 FormatSize( double fBytesSent, double fFileSize, wxString& strBuffer ) const;
--    void                    GetDocTime(wxInt32 item, double& fBuffer) const;
--    wxInt32                 FormatTime( double fBuffer, wxString& strBuffer ) const;
--    void                    GetDocSpeed(wxInt32 item, double& fBuffer) const;
--    wxInt32                 FormatSpeed( double fBuffer, wxString& strBuffer ) const;
--    void                    GetDocStatus(wxInt32 item, wxString& strBuffer) const;
--    void                    GetDocProjectURL(wxInt32 item, wxString& strBuffer) const;
-+    int                     GetDocProjectName(const wxInt32 item, wxString& strBuffer) const;
-+    int                     GetDocFileName(const wxInt32 item, wxString& strBuffer) const;
-+    int                     GetDocProgress(const wxInt32 item, float& fBuffer) const;
-+    wxInt32                 FormatProgress(const float fBuffer, wxString& strBuffer ) const;
-+    int                     GetDocBytesXferred(const wxInt32 item, double& fBuffer) const;
-+    int                     GetDocTotalBytes(const wxInt32 item, double& fBuffer) const;
-+    wxInt32                 FormatSize( const double fBytesSent, double fFileSize, wxString& strBuffer ) const;
-+    int                     GetDocTime(const wxInt32 item, double& fBuffer) const;
-+    wxInt32                 FormatTime(const  double fBuffer, wxString& strBuffer ) const;
-+    int                     GetDocSpeed(const wxInt32 item, double& fBuffer) const;
-+    wxInt32                 FormatSpeed(const  double fBuffer, wxString& strBuffer ) const;
-+    int                     GetDocStatus(const wxInt32 item, wxString& strBuffer) const;
-+    int                     GetDocProjectURL(const wxInt32 item, wxString& strBuffer) const;
- 
--    virtual double          GetProgressValue(long item);
--    virtual wxString        GetProgressText( long item);
-+    virtual double          GetProgressValue(const long item) const;
-+    virtual wxString        GetProgressText( const long item) const;
-     
--    int                     GetTransferCacheAtIndex(CTransfer*& transferPtr, int index);
-+    int                     GetTransferCacheAtIndex(CTransfer*& transferPtr, const int index) const;
- 
-     DECLARE_EVENT_TABLE()
- };
-Index: boinc/clientgui/WelcomePage.cpp
-===================================================================
---- boinc.orig/clientgui/WelcomePage.cpp	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/WelcomePage.cpp	2011-11-25 00:29:27.000000000 +0100
-@@ -69,7 +69,7 @@
- {
- }
-  
--CWelcomePage::CWelcomePage( CBOINCBaseWizard* parent )
-+CWelcomePage::CWelcomePage( CBOINCBaseWizard* const parent )
- {
-     Create( parent );
- }
-@@ -78,7 +78,7 @@
-  * WizardPage creator
-  */
-  
--bool CWelcomePage::Create( CBOINCBaseWizard* parent )
-+bool CWelcomePage::Create( CBOINCBaseWizard* const parent )
- {
- ////@begin CWelcomePage member initialisation
-     m_pTitleStaticCtrl = NULL;
-Index: boinc/clientgui/WelcomePage.h
-===================================================================
---- boinc.orig/clientgui/WelcomePage.h	2011-03-17 18:51:03.000000000 +0100
-+++ boinc/clientgui/WelcomePage.h	2011-11-25 00:29:50.000000000 +0100
-@@ -35,10 +35,10 @@
-     /// Constructors
-     CWelcomePage( );
- 
--    CWelcomePage( CBOINCBaseWizard* parent );
-+    CWelcomePage( CBOINCBaseWizard* const parent );
- 
-     /// Creation
--    bool Create( CBOINCBaseWizard* parent );
-+    bool Create( CBOINCBaseWizard* const parent );
- 
-     /// Creates the controls and sizers
-     void CreateControls();
-Index: boinc/clientgui/WizardAttach.cpp
-===================================================================
---- boinc.orig/clientgui/WizardAttach.cpp	2011-07-24 19:39:09.000000000 +0200
-+++ boinc/clientgui/WizardAttach.cpp	2011-11-25 23:55:51.000000000 +0100
-@@ -80,7 +80,7 @@
- {
- }
-  
--CWizardAttach::CWizardAttach( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, long style ) 
-+CWizardAttach::CWizardAttach( wxWindow* const parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const long style )
- {
-     Create(parent, id, title, pos, style);
- }
-@@ -89,7 +89,7 @@
-  * CWizardAttach creator
-  */
-  
--bool CWizardAttach::Create( wxWindow* parent, wxWindowID id, const wxString& /* title */, const wxPoint& pos, long style )
-+bool CWizardAttach::Create( wxWindow* const parent, const wxWindowID id, const wxString& /* title */, const wxPoint& pos, const long style )
- {
- 
- ////@begin CWizardAttach member initialisation
-@@ -351,8 +351,8 @@
-  * Runs the wizard.
-  */
- bool CWizardAttach::Run(
--    wxString& WXUNUSED(strName), wxString& strURL, wxString& strTeamName,
--    bool bCredentialsCached
-+    const wxString& WXUNUSED(strName), const wxString& strURL, const wxString& strTeamName,
-+    const bool bCredentialsCached
- ) {
-     m_strTeamName = strTeamName;
- 
-@@ -456,7 +456,7 @@
-  * Get bitmap resources
-  */
-  
--wxBitmap CWizardAttach::GetBitmapResource( const wxString& WXUNUSED(name) )
-+wxBitmap CWizardAttach::GetBitmapResource( const wxString& WXUNUSED(name) ) const
- {
-     // Bitmap retrieval
- ////@begin CWizardAttach bitmap retrieval
-@@ -468,7 +468,7 @@
-  * Get icon resources
-  */
-  
--wxIcon CWizardAttach::GetIconResource( const wxString& WXUNUSED(name) )
-+wxIcon CWizardAttach::GetIconResource( const wxString& WXUNUSED(name) ) const
- {
-     // Icon retrieval
- ////@begin CWizardAttach icon retrieval
-@@ -480,7 +480,7 @@
-  * Determine if the wizard page has a next page
-  */
- 
--bool CWizardAttach::HasNextPage( wxWizardPageEx* page )
-+bool CWizardAttach::HasNextPage( const wxWizardPageEx* const page ) const
- {
-     bool bNoNextPageDetected = false;
- 
-@@ -500,7 +500,7 @@
-  * Determine if the wizard page has a previous page
-  */
-  
--bool CWizardAttach::HasPrevPage( wxWizardPageEx* page )
-+bool CWizardAttach::HasPrevPage( const wxWizardPageEx* const page ) const
- {
-     if ((page == m_WelcomePage) || (page == m_CompletionPage) || (page == m_CompletionErrorPage))
-         return false;
-@@ -534,7 +534,7 @@
- /*!
-  * Add the page transition to the stack.
-  */
--wxWizardPageEx* CWizardAttach::_PushPageTransition( wxWizardPageEx* pCurrentPage, unsigned long ulPageID ) {
-+wxWizardPageEx* CWizardAttach::_PushPageTransition( wxWizardPageEx* const pCurrentPage, const unsigned long ulPageID ) {
-     if (GetCurrentPage()) {
-         wxWizardPageEx* pPage = NULL;
- 
-Index: boinc/clientgui/WizardAttach.h
-===================================================================
---- boinc.orig/clientgui/WizardAttach.h	2011-07-24 19:39:09.000000000 +0200
-+++ boinc/clientgui/WizardAttach.h	2011-11-25 00:35:14.000000000 +0100
-@@ -192,10 +192,10 @@
- public:
-     /// Constructors
-     CWizardAttach( );
--    CWizardAttach( wxWindow* parent, wxWindowID id = SYMBOL_CWIZARDATTACH_IDNAME, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE );
-+    CWizardAttach( wxWindow* const parent, wxWindowID const id = SYMBOL_CWIZARDATTACH_IDNAME, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const long style = wxDEFAULT_DIALOG_STYLE );
- 
-     /// Creation
--    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CWIZARDATTACH_IDNAME, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE );
-+    bool Create( wxWindow* const parent, const wxWindowID id = SYMBOL_CWIZARDATTACH_IDNAME, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const long style = wxDEFAULT_DIALOG_STYLE );
- 
-     /// Creates the controls and sizers
-     void CreateControls();
-@@ -216,25 +216,25 @@
- 
-     /// Runs the wizard.
-     bool Run(
--        wxString& strName,
--        wxString& strURL,
--        wxString& wxString,
--        bool bCredentialsCached = true
-+        const wxString& strName,
-+        const wxString& strURL,
-+        const wxString& wxString,
-+        const bool bCredentialsCached = true
-     );
-     
-     // Synchronize to Account Manager
-     bool SyncToAccountManager();
- 
-     /// Retrieves bitmap resources
--    wxBitmap GetBitmapResource( const wxString& name );
-+    wxBitmap GetBitmapResource( const wxString& name ) const;
- 
-     /// Retrieves icon resources
--    wxIcon GetIconResource( const wxString& name );
-+    wxIcon GetIconResource( const wxString& name ) const;
- ////@end CWizardAttachProject member function declarations
- 
-     /// Overrides
--    virtual bool HasNextPage( wxWizardPageEx* page );
--    virtual bool HasPrevPage( wxWizardPageEx* page );
-+    virtual bool HasNextPage( const wxWizardPageEx* const page ) const;
-+    virtual bool HasPrevPage( const wxWizardPageEx* const page ) const;
- 
-     /// Track page transitions
-     wxWizardPageEx* _PopPageTransition();
-@@ -251,13 +251,13 @@
-     void SetAttachedToProjectSuccessfully(bool value) { attached_to_project_successfully = value ; }
- 
-     wxString GetProjectName() const { return m_strProjectName ; }
--    void SetProjectName(wxString value) { m_strProjectName = value ; }
-+    void SetProjectName(const wxString value) { m_strProjectName = value ; }
- 
-     wxString GetProjectURL() const { return m_strProjectUrl ; }
--    void SetProjectURL(wxString value) { m_strProjectUrl = value ; }
-+    void SetProjectURL(const wxString value) { m_strProjectUrl = value ; }
- 
-     wxString GetProjectAuthenticator() const { return m_strProjectAuthenticator ; }
--    void SetProjectAuthenticator(wxString value) { m_strProjectAuthenticator = value ; }
-+    void SetProjectAuthenticator(const wxString value) { m_strProjectAuthenticator = value ; }
- 
-     /// Should we show tooltips?
-     static bool ShowToolTips();
-Index: boinc/lib/gui_rpc_client.h
-===================================================================
---- boinc.orig/lib/gui_rpc_client.h	2011-11-14 01:15:55.000000000 +0100
-+++ boinc/lib/gui_rpc_client.h	2011-11-25 22:01:42.000000000 +0100
-@@ -385,13 +385,13 @@
-     CC_STATE();
-     ~CC_STATE();
- 
--    PROJECT* lookup_project(const char* const url);
--    APP* lookup_app(const PROJECT* const, const char* const name);
--    APP_VERSION* lookup_app_version(const PROJECT* const, const APP* const, int, const char* const plan_class);
--    APP_VERSION* lookup_app_version_old(const PROJECT* const, const APP* const, int);
--    WORKUNIT* lookup_wu(const PROJECT* const, const char* const name);
--    RESULT* lookup_result(const PROJECT* const, const char* const name);
--    RESULT* lookup_result(const char* const url, const char* const name);
-+    PROJECT* lookup_project(const char* const url) const;
-+    APP* lookup_app(const PROJECT* const, const char* const name) const;
-+    APP_VERSION* lookup_app_version(const PROJECT* const, const APP* const, int, const char* const plan_class) const;
-+    APP_VERSION* lookup_app_version_old(const PROJECT* const, const APP* const, int) const;
-+    WORKUNIT* lookup_wu(const PROJECT* const, const char* const name) const;
-+    RESULT* lookup_result(const PROJECT* const, const char* const name) const;
-+    RESULT* lookup_result(const char* const url, const char* const name) const;
- 
-     void print();
-     void clear();
-Index: boinc/lib/gui_rpc_client_ops.cpp
-===================================================================
---- boinc.orig/lib/gui_rpc_client_ops.cpp	2011-11-14 01:14:41.000000000 +0100
-+++ boinc/lib/gui_rpc_client_ops.cpp	2011-11-25 22:03:08.000000000 +0100
-@@ -908,7 +908,7 @@
-     have_ati = false;
- }
- 
--PROJECT* CC_STATE::lookup_project(const char* const url) {
-+PROJECT* CC_STATE::lookup_project(const char* const url) const {
-     unsigned int i;
-     for (i=0; i<projects.size(); i++) {
-         if (!strcmp(projects[i]->master_url, url)) return projects[i];
-@@ -916,7 +916,7 @@
-     return 0;
- }
- 
--APP* CC_STATE::lookup_app(const PROJECT* const project, const char* const name) {
-+APP* CC_STATE::lookup_app(const PROJECT* const project, const char* const name) const {
-     unsigned int i;
-     for (i=0; i<apps.size(); i++) {
-         if (apps[i]->project != project) continue;
-@@ -927,7 +927,7 @@
- 
- APP_VERSION* CC_STATE::lookup_app_version(
-     const PROJECT* const project, const APP* const app, const int version_num, const char* const plan_class
--) {
-+) const {
-     unsigned int i;
-     for (i=0; i<app_versions.size(); i++) {
-         if (app_versions[i]->project != project) continue;
-@@ -941,7 +941,7 @@
- 
- APP_VERSION* CC_STATE::lookup_app_version_old(
-     const PROJECT* const project, const APP* const app, const int version_num
--) {
-+) const {
-     unsigned int i;
-     for (i=0; i<app_versions.size(); i++) {
-         if (app_versions[i]->project != project) continue;
-@@ -952,7 +952,7 @@
-     return 0;
- }
- 
--WORKUNIT* CC_STATE::lookup_wu(const PROJECT* const project, const char* const name) {
-+WORKUNIT* CC_STATE::lookup_wu(const PROJECT* const project, const char* const name) const {
-     unsigned int i;
-     for (i=0; i<wus.size(); i++) {
-         if (wus[i]->project != project) continue;
-@@ -961,7 +961,7 @@
-     return 0;
- }
- 
--RESULT* CC_STATE::lookup_result(const PROJECT* const project, const char* const name) {
-+RESULT* CC_STATE::lookup_result(const PROJECT* const project, const char* const name) const {
-     unsigned int i;
-     for (i=0; i<results.size(); i++) {
-         if (results[i]->project != project) continue;
-@@ -970,7 +970,7 @@
-     return 0;
- }
- 
--RESULT* CC_STATE::lookup_result(const char* const url, const char* const name) {
-+RESULT* CC_STATE::lookup_result(const char* const url, const char* const name) const {
-     unsigned int i;
-     for (i=0; i<results.size(); i++) {
-         if (strcmp(results[i]->project->master_url, url)) continue;
diff --git a/debian/patches/andYetMorePatches04.patch b/debian/patches/andYetMorePatches04.patch
deleted file mode 100644
index 087cd93..0000000
--- a/debian/patches/andYetMorePatches04.patch
+++ /dev/null
@@ -1,1191 +0,0 @@
-Author: Steffen Moeller <moeller at debian.org>
-Description: More 'const' flags. This patch is not applied.
-Index: boinc/lib/url.cpp
-===================================================================
---- boinc.orig/lib/url.cpp	2011-11-26 19:31:03.000000000 +0100
-+++ boinc/lib/url.cpp	2011-11-26 19:32:54.000000000 +0100
-@@ -25,6 +25,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
-+#include <assert.h>
- #endif
- 
- #include "str_util.h"
-@@ -38,7 +39,7 @@
- // URL format:
- // [{http|https|socks}://][user[:passwd]@]host.dom.dom[:port][/dir/file]
- //
--void parse_url(const char* url, PARSED_URL& purl) {
-+void parse_url(const char* const url, PARSED_URL& purl) {
-     char* p, *q, *buf;
-     char _buf[256];
- 
-@@ -105,7 +106,7 @@
-     strcpy(purl.host, buf);
- }
- 
--static char x2c(char *what) {
-+static char x2c(const char *const what) {
-     register char digit;
- 
-     digit = (what[0] >= 'A' ? ((what[0] & 0xdf) - 'A')+10 : (what[0] - '0'));
-@@ -114,7 +115,7 @@
-     return(digit);
- }
- 
--void c2x(char *what) {
-+void c2x(char *const what) {
-     char buf[3];
-     char num = atoi(what);
-     char d1 = num / 16;
-@@ -131,7 +132,7 @@
-     strcpy(what, buf);
- }
- 
--void unescape_url(char *url) {
-+void unescape_url(char *const url) {
-     int x,y;
- 
-     for (x=0,y=0;url[y];++x,++y) {
-@@ -143,7 +144,7 @@
-     url[x] = '\0';
- }
- 
--void unescape_url_safe(char *url, int url_size) {
-+void unescape_url_safe(char *const url, const int url_size) {
-     int x,y;
- 
-     for (x=0,y=0; url[y] && (x<url_size);++x,++y) {
-@@ -164,7 +165,7 @@
-     url = buf;
- }
- 
--void escape_url(char *in, char*out) {
-+void escape_url(const char *const in, char*const out) {
-     int x, y;
-     for (x=0, y=0; in[x]; ++x) {
-         if (isalnum(in[x])) {
-@@ -184,7 +185,7 @@
-     out[y] = 0;
- }
- 
--void escape_url_safe(const char *in, char*out, int out_size) {
-+void escape_url_safe(const char *const in, char* const out, const int out_size) {
-     int x, y;
-     for (x=0, y=0; in[x] && (y<out_size); ++x) {
-         if (isalnum(in[x])) {
-@@ -213,17 +214,22 @@
- }
- 
- // Escape a URL for the project directory, cutting off the "http://",
-+// or any other protocol identifier preceeding the "://" separator,
- // converting everthing other than alphanumbers, ., - and _ to "_".
- //
--void escape_url_readable(char *in, char* out) {
--    int x, y;
--    char *temp;
-+void escape_url_readable(const char *const inOrig, char* const out) {
-+
-+    assert(inOrig);
-+    assert(out);
- 
--    temp = strstr(in,"://");
-+    const char *in = inOrig;
-+    const char *temp = strstr(inOrig,"://");
-     if (temp) {
--        in = temp + strlen("://");
-+    	in = temp + strlen("://");
-     }
--    for (x=0, y=0; in[x]; ++x) {
-+
-+    int y=0;
-+    for (int x=0; in[x]; ++x) {
-         if (isalnum(in[x]) || in[x]=='.' || in[x]=='-' || in[x]=='_') {
-             out[y] = in[x];
-             ++y;
-@@ -242,7 +248,7 @@
- //   - Remove double slashes in the rest
- //   - Add a trailing slash if necessary
- //
--void canonicalize_master_url(char* url) {
-+void canonicalize_master_url(char* const url) {
-     char buf[1024];
-     size_t n;
-     bool bSSL = false; // keep track if they sent in https://
-@@ -275,7 +281,7 @@
- 
- // is the string a valid master URL, in canonical form?
- //
--bool valid_master_url(char* buf) {
-+bool valid_master_url(char* const buf) {
-     char* p, *q;
-     size_t n;
-     bool bSSL = false;
-@@ -303,7 +309,7 @@
-     return true;
- }
- 
--void escape_project_url(char *in, char* out) {
-+void escape_project_url(const char *const in, char* const out) {
-     escape_url_readable(in, out);
-     char& last = out[strlen(out)-1];
-     // remove trailing _
-Index: boinc/lib/url.h
-===================================================================
---- boinc.orig/lib/url.h	2011-11-26 19:31:03.000000000 +0100
-+++ boinc/lib/url.h	2011-11-26 19:32:54.000000000 +0100
-@@ -32,15 +32,15 @@
-     char file[256];
- };
- 
--extern void parse_url(const char* url, PARSED_URL&);
-+extern void parse_url(const char* const url, PARSED_URL&);
- extern void unescape_url(std::string& url);
--extern void unescape_url(char *url);
-+extern void unescape_url(char *const url);
- extern void escape_url(std::string& url);
--extern void escape_url(char *in, char*out);
--extern void escape_url_readable(char* in, char* out);
--extern void escape_project_url(char *in, char* out);
--extern bool valid_master_url(char*);
--extern void canonicalize_master_url(char *url);
-+extern void escape_url(const char *const in, char* const out);
-+extern void escape_url_readable(const char* const in, char* const out);
-+extern void escape_project_url(const char *const in, char* const out);
-+extern bool valid_master_url(char* const);
-+extern void canonicalize_master_url(char *const url);
- extern void canonicalize_master_url(std::string&);
- 
- #endif
-Index: boinc/lib/crypt.cpp
-===================================================================
---- boinc.orig/lib/crypt.cpp	2011-11-26 20:24:29.000000000 +0100
-+++ boinc/lib/crypt.cpp	2011-11-27 01:36:37.000000000 +0100
-@@ -63,7 +63,7 @@
- // NOTE: since length may not be known to the reader,
- // we follow the data with a non-hex character '.'
- //
--int print_hex_data(FILE* f, DATA_BLOCK& x) {
-+int print_hex_data(FILE* const f, const DATA_BLOCK& x) {
-     unsigned int i;
- 
-     for (i=0; i<x.len; i++) {
-@@ -77,7 +77,7 @@
- 
- // same, but write to buffer
- //
--int sprint_hex_data(char* out_buf, DATA_BLOCK& x) {
-+int sprint_hex_data(char* const out_buf, DATA_BLOCK& x) {
-     unsigned int i;
-     const char hex[] = "0123456789abcdef";
-     char* p = out_buf;
-@@ -93,7 +93,7 @@
-     return 0;
- }
- 
--int print_raw_data(FILE* f, DATA_BLOCK& x) {
-+int print_raw_data(FILE* const f, DATA_BLOCK& x) {
-     unsigned int i;
-     for (i=0; i<x.len; i++) {
-         //printf("%x ", x.data[i]);
-@@ -103,7 +103,7 @@
- }
- 
- // NOTE: buffer must be big enough; no checking is done.
--int scan_raw_data(FILE *f, DATA_BLOCK& x) {
-+int scan_raw_data(FILE *const f, DATA_BLOCK& x) {
-     int i=0,j;
-     while(EOF!=(j=fgetc(f))) {
-         x.data[i]=j;
-@@ -117,7 +117,7 @@
- // stop when you reach a non-parsed character.
- // NOTE: buffer must be big enough; no checking is done.
- //
--int scan_hex_data(FILE* f, DATA_BLOCK& x) {
-+int scan_hex_data(FILE* const f, DATA_BLOCK& x) {
-     int n;
- 
-     x.len = 0;
-@@ -173,18 +173,20 @@
- 
- // print a key in ASCII form
- //
--int print_key_hex(FILE* f, KEY* key, int size) {
-+int print_key_hex(FILE* const f, KEY* const key, const int size) {
-     int len;
--    DATA_BLOCK x;
--
-     fprintf(f, "%d\n", key->bits);
-     len = size - sizeof(key->bits);
--    x.data = key->data;
--    x.len = len;
-+
-+    const DATA_BLOCK x = {
-+       key->data,
-+       len
-+    };
-+
-     return print_hex_data(f, x);
- }
- 
--int scan_key_hex(FILE* f, KEY* key, int size) {
-+int scan_key_hex(FILE* const f, KEY* const key, const int size) {
-     int len, i, n;
-     int num_bits;
- 
-@@ -222,7 +224,7 @@
- 
- // parse a text-encoded key from a memory buffer
- //
--int sscan_key_hex(const char* buf, KEY* key, int size) {
-+int sscan_key_hex(const char* buf, KEY* const key, const int size) {
-     int n, retval,num_bits;
-     DATA_BLOCK db;
- 
-@@ -246,7 +248,7 @@
- // The output buffer must be at least MIN_OUT_BUFFER_SIZE.
- // The output block must be decrypted in its entirety.
- //
--int encrypt_private(R_RSA_PRIVATE_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out) {
-+int encrypt_private(const R_RSA_PRIVATE_KEY& key, const DATA_BLOCK& in, DATA_BLOCK& out) {
-     int n, modulus_len, retval;
- 
-     modulus_len = (key.bits+7)/8;
-@@ -266,7 +268,7 @@
-     return 0;
- }
- 
--int decrypt_public(R_RSA_PUBLIC_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out) {
-+int decrypt_public(const R_RSA_PUBLIC_KEY& key, const DATA_BLOCK& in, DATA_BLOCK& out) {
-     int retval;
-     RSA* rp = RSA_new();
-     public_to_openssl(key, rp);
-@@ -280,7 +282,7 @@
-     return 0;
- }
- 
--int sign_file(const char* path, R_RSA_PRIVATE_KEY& key, DATA_BLOCK& signature) {
-+int sign_file(const char* const path, const R_RSA_PRIVATE_KEY& key, DATA_BLOCK& signature) {
-     char md5_buf[MD5_LEN];
-     double file_length;
-     DATA_BLOCK in_block;
-@@ -295,7 +297,7 @@
-     return 0;
- }
- 
--int sign_block(DATA_BLOCK& data_block, R_RSA_PRIVATE_KEY& key, DATA_BLOCK& signature) {
-+int sign_block(DATA_BLOCK& data_block, const R_RSA_PRIVATE_KEY& key, DATA_BLOCK& signature) {
-     char md5_buf[MD5_LEN];
-     int retval;
-     DATA_BLOCK in_block;
-@@ -314,7 +316,7 @@
- // compute an XML signature element for some text
- //
- int generate_signature(
--    char* text_to_sign, char* signature_hex, R_RSA_PRIVATE_KEY& key
-+    const char* const text_to_sign, char* signature_hex, const R_RSA_PRIVATE_KEY& key
- )  {
-     DATA_BLOCK block, signature_data;
-     unsigned char signature_buf[SIGNATURE_SIZE_BINARY];
-@@ -331,7 +333,7 @@
- }
- 
- int verify_file(
--    const char* path, R_RSA_PUBLIC_KEY& key, DATA_BLOCK& signature, bool& answer
-+    const char* const path, const R_RSA_PUBLIC_KEY& key, const DATA_BLOCK& signature, bool& answer
- ) {
-     char md5_buf[MD5_LEN], clear_buf[MD5_LEN];
-     double file_length;
-@@ -356,7 +358,7 @@
- }
- 
- int verify_file2(
--    const char* path, const char* signature_text, const char* key_text, bool& answer
-+    const char* const path, const char* const signature_text, const char* const key_text, bool& answer
- ) {
-     R_RSA_PUBLIC_KEY key;
-     unsigned char signature_buf[SIGNATURE_SIZE_BINARY];
-@@ -378,7 +380,7 @@
- // verify, where both text and signature are char strings
- //
- int verify_string(
--    const char* text, const char* signature_text, R_RSA_PUBLIC_KEY& key, bool& answer
-+    const char* const text, const char* const signature_text, const R_RSA_PUBLIC_KEY& key, bool& answer
- ) {
-     char md5_buf[MD5_LEN];
-     unsigned char signature_buf[SIGNATURE_SIZE_BINARY];
-@@ -404,7 +406,7 @@
- // Same, where public key is also encoded as text
- //
- int verify_string2(
--    const char* text, const char* signature_text, const char* key_text, bool& answer
-+    const char* const text, const char* const signature_text, const char* const key_text, bool& answer
- ) {
-     R_RSA_PUBLIC_KEY key;
-     int retval;
-@@ -441,7 +443,7 @@
- }
- 
- void openssl_to_keys(
--    RSA* rp, int nbits, R_RSA_PRIVATE_KEY& priv, R_RSA_PUBLIC_KEY& pub
-+    const RSA* const rp, int nbits, R_RSA_PRIVATE_KEY& priv, R_RSA_PUBLIC_KEY& pub
- ) {
-     pub.bits = nbits;
-     bn_to_bin(rp->n, pub.modulus, sizeof(pub.modulus));
-@@ -459,7 +461,7 @@
-     bn_to_bin(rp->iqmp, priv.coefficient, sizeof(priv.coefficient));
- }
- 
--void private_to_openssl(R_RSA_PRIVATE_KEY& priv, RSA* rp) {
-+void private_to_openssl(const R_RSA_PRIVATE_KEY& priv, RSA* rp) {
-     rp->n = BN_bin2bn(priv.modulus, sizeof(priv.modulus), 0);
-     rp->e = BN_bin2bn(priv.publicExponent, sizeof(priv.publicExponent), 0);
-     rp->d = BN_bin2bn(priv.exponent, sizeof(priv.exponent), 0);
-@@ -470,7 +472,7 @@
-     rp->iqmp = BN_bin2bn(priv.coefficient, sizeof(priv.coefficient), 0);
- }
- 
--void public_to_openssl(R_RSA_PUBLIC_KEY& pub, RSA* rp) {
-+void public_to_openssl(const R_RSA_PUBLIC_KEY& pub, RSA* rp) {
-     rp->n = BN_bin2bn(pub.modulus, sizeof(pub.modulus), 0);
-     rp->e = BN_bin2bn(pub.exponent, sizeof(pub.exponent), 0);
- }
-@@ -509,8 +511,8 @@
- }
- 
- int check_validity_of_cert(
--    const char *cFile, const unsigned char *md5_md, unsigned char *sfileMsg,
--    const int sfsize, const char* caPath
-+    const char *const cFile, const unsigned char *md5_md, const unsigned char *sfileMsg,
-+    const int sfsize, const char* const caPath
- ) {
-     int retval = 0;
-     X509 *cert;
-@@ -577,8 +579,8 @@
- }
- 
- char *check_validity(
--    const char *certPath, const char *origFile, unsigned char *signature,
--    char* caPath
-+    const char *const certPath, const char *const origFile, const unsigned char *const signature,
-+    const char* const caPath
- ) {
-     MD5_CTX md5CTX;
-     int rbytes;
-@@ -617,7 +619,7 @@
- }
- 
- int cert_verify_file(
--    CERT_SIGS* signatures, const char* origFile, const char* trustLocation
-+    const CERT_SIGS* const signatures, const char* const origFile, const char* const trustLocation
- ) {
-     MD5_CTX md5CTX;
-     int rbytes;
-Index: boinc/lib/crypt.h
-===================================================================
---- boinc.orig/lib/crypt.h	2011-10-08 14:11:56.000000000 +0200
-+++ boinc/lib/crypt.h	2011-12-02 02:55:14.000000000 +0100
-@@ -54,9 +54,9 @@
- extern void openssl_to_keys(
-     RSA* rp, int nbits, R_RSA_PRIVATE_KEY& priv, R_RSA_PUBLIC_KEY& pub
- );
--extern void private_to_openssl(R_RSA_PRIVATE_KEY& priv, RSA* rp);
--extern void public_to_openssl(R_RSA_PUBLIC_KEY& pub, RSA* rp);
--extern int openssl_to_private(RSA *from, R_RSA_PRIVATE_KEY *to);
-+extern void private_to_openssl(const R_RSA_PRIVATE_KEY& priv, RSA* rp);
-+extern void public_to_openssl(const R_RSA_PUBLIC_KEY& pub, RSA* rp);
-+extern int openssl_to_private(const RSA *const from, R_RSA_PRIVATE_KEY *to);
- 
- struct KEY {
-     unsigned short int bits;
-@@ -76,47 +76,47 @@
- 
- // size of text-encoded signature
- #define SIGNATURE_SIZE_TEXT (SIGNATURE_SIZE_BINARY*2+20)
--extern int sprint_hex_data(char* p, DATA_BLOCK&);
-+extern int sprint_hex_data(const char* const p, const DATA_BLOCK&);
- #ifdef _USING_FCGI_
- #undef FILE
- #endif
--extern int print_hex_data(FILE* f, DATA_BLOCK&);
--extern int scan_hex_data(FILE* f, DATA_BLOCK&);
--extern int print_key_hex(FILE*, KEY* key, int len);
--extern int scan_key_hex(FILE*, KEY* key, int len);
-+extern int print_hex_data(FILE* const f, const DATA_BLOCK&);
-+extern int scan_hex_data(FILE* const f, DATA_BLOCK&);
-+extern int print_key_hex(FILE* const, const KEY* const key, const int len);
-+extern int scan_key_hex(FILE* const, KEY* key, const int len);
- #ifdef _USING_FCGI_
- #define FILE FCGI_FILE
- #endif
--extern int sscan_key_hex(const char*, KEY* key, int len);
-+extern int sscan_key_hex(const char*, KEY* const key, const int len);
- extern int encrypt_private(
--    R_RSA_PRIVATE_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out
-+    const R_RSA_PRIVATE_KEY& key, const DATA_BLOCK& in, DATA_BLOCK& out
- );
- extern int decrypt_public(
--    R_RSA_PUBLIC_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out
-+    const R_RSA_PUBLIC_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out
- );
- extern int sign_file(
--    const char* path, R_RSA_PRIVATE_KEY&, DATA_BLOCK& signature
-+    const char* const path, const R_RSA_PRIVATE_KEY&, DATA_BLOCK& signature
- );
- extern int sign_block(
--    DATA_BLOCK& data, R_RSA_PRIVATE_KEY&, DATA_BLOCK& signature
-+    const DATA_BLOCK& data, const R_RSA_PRIVATE_KEY&, DATA_BLOCK& signature
- );
- extern int verify_file(
--    const char* path, R_RSA_PUBLIC_KEY&, DATA_BLOCK& signature, bool&
-+    const char* const path, const R_RSA_PUBLIC_KEY&, const DATA_BLOCK& signature, bool&
- );
- extern int verify_file2(
--    const char* path, const char* signature, const char* key, bool&
-+    const char* const path, const char* const signature, const char* const key, bool&
- );
- extern int verify_string(
--    const char* text, const char* signature, R_RSA_PUBLIC_KEY&, bool&
-+    const char* const text, const char* const signature, const R_RSA_PUBLIC_KEY&, bool&
- );
- extern int verify_string2(
--    const char* text, const char* signature, const char* key, bool&
-+    const char* const text, const char* const signature, const char* const key, bool&
- );
--extern int print_raw_data(FILE* f, DATA_BLOCK& x);
--extern int scan_raw_data(FILE *f, DATA_BLOCK& x);
--extern int read_key_file(const char* keyfile, R_RSA_PRIVATE_KEY& key);
-+extern int print_raw_data(FILE* const f,const DATA_BLOCK& x);
-+extern int scan_raw_data(FILE* const f, DATA_BLOCK& x);
-+extern int read_key_file(const char* const keyfile, R_RSA_PRIVATE_KEY& key);
- extern int generate_signature(
--    char* text_to_sign, char* signature_hex, R_RSA_PRIVATE_KEY& key
-+    const char* const text_to_sign, char* signature_hex, const R_RSA_PRIVATE_KEY& key
- );
- 
- //   Check if sfileMsg (of length sfsize) has been created from sha1_md using the
-@@ -125,17 +125,17 @@
- //    1: YES
- //    0: NO or error
- extern int check_validity_of_cert(
--    const char *cFile, const unsigned char *sha1_md, 
--    unsigned char *sfileMsg, const int sfsize, const char* caPath
-+    const char *const cFile, const unsigned char* const sha1_md,
-+    const unsigned char *const sfileMsg, const int sfsize, const char* const caPath
- );
- 
--extern char *check_validity(const char *certPath, const char *origFile, 
--    unsigned char *signature, char* caPath
-+extern char *check_validity(const char *const certPath, const char *const origFile, 
-+    const unsigned char *const signature, const char* const caPath
- );
- 
- struct CERT_SIGS;
- 
- int cert_verify_file(
--    CERT_SIGS* signatures, const char* origFile, const char* trustLocation
-+    const CERT_SIGS* const signatures, const char* const origFile, const char* const trustLocation
- );
- #endif
-Index: boinc/lib/filesys.cpp
-===================================================================
---- boinc.orig/lib/filesys.cpp	2011-11-26 00:34:25.000000000 +0100
-+++ boinc/lib/filesys.cpp	2011-11-26 20:19:13.000000000 +0100
-@@ -85,7 +85,7 @@
- 
- // routines for enumerating the entries in a directory
- 
--int is_file(const char* path) {
-+int is_file(const char* const path) {
-     struct stat sbuf;
- #ifdef _WIN32
-     int retval = stat(path, &sbuf);
-@@ -95,7 +95,7 @@
-     return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFREG));
- }
- 
--int is_dir(const char* path) {
-+int is_dir(const char* const path) {
-     struct stat sbuf;
- #ifdef _WIN32
-     int retval = stat(path, &sbuf);
-@@ -106,7 +106,7 @@
- }
- 
- #ifndef _WIN32
--int is_symlink(const char* path) {
-+int is_symlink(const char* const path) {
-     struct stat sbuf;
-     int retval = lstat(path, &sbuf);
-     return (!retval && S_ISLNK(sbuf.st_mode));
-@@ -115,7 +115,7 @@
- 
- // Open a directory
- //
--DIRREF dir_open(const char* p) {
-+DIRREF dir_open(const char* const p) {
-     DIRREF dirp;
- #ifdef _WIN32
-     if (!is_dir(p)) return NULL;
-@@ -198,7 +198,7 @@
- #endif
- }
- 
--bool is_dir_empty(const char *p) {
-+bool is_dir_empty(const char *const p) {
-     char file[256];
- 
-     DIRREF dir = dir_open(p);
-@@ -278,7 +278,7 @@
- #endif
- }
- 
--static int boinc_delete_file_aux(const char* path) {
-+static int boinc_delete_file_aux(const char* const path) {
- #ifdef _WIN32
-     if (!DeleteFileA(path)) {
-         return ERR_UNLINK;
-@@ -292,7 +292,7 @@
- 
- // Delete the file located at path
- //
--int boinc_delete_file(const char* path) {
-+int boinc_delete_file(const char* const path) {
-     int retval = 0;
- 
-     if (!boinc_file_exists(path)) {
-@@ -316,7 +316,7 @@
- 
- // get file size
- //
--int file_size(const char* path, double& size) {
-+int file_size(const char* const path, double& size) {
-     struct stat sbuf;
-     int retval;
- 
-@@ -326,7 +326,7 @@
-     return 0;
- }
- 
--int boinc_truncate(const char* path, double size) {
-+int boinc_truncate(const char* const path, const double size) {
-     int retval;
- #if defined(_WIN32) &&  !defined(__CYGWIN32__)
-     // the usual Windows nightmare.
-@@ -347,7 +347,7 @@
- 
- // remove everything from specified directory
- //
--int clean_out_dir(const char* dirpath) {
-+int clean_out_dir(const char* const dirpath) {
-     char filename[256], path[256];
-     int retval;
-     DIRREF dirp;
-@@ -375,7 +375,7 @@
- // Win: use special version because stat() is slow, can be avoided
- // Unix: follow symbolic links
- //
--int dir_size(const char* dirpath, double& size, bool recurse) {
-+int dir_size(const char* const dirpath, double& size, const bool recurse) {
- #ifdef WIN32
-     char path2[_MAX_PATH];
-     sprintf(path2, "%s/*", dirpath);
-@@ -430,7 +430,7 @@
-     return 0;
- }
- 
--FILE* boinc_fopen(const char* path, const char* mode) {
-+FILE* boinc_fopen(const char* const path, const char* const mode) {
-     // if opening for read, and file isn't there,
-     // leave now (avoid 5-second delay!!)
-     //
-@@ -481,7 +481,7 @@
- }
- 
- 
--int boinc_file_exists(const char* path) {
-+int boinc_file_exists(const char* const path) {
-     struct stat buf;
-     if (stat(path, &buf)) {
-         return false;     // stat() returns zero on success
-@@ -491,7 +491,7 @@
- 
- // same, but doesn't traverse symlinks
- //
--int boinc_file_or_symlink_exists(const char* path) {
-+int boinc_file_or_symlink_exists(const char* const path) {
-     struct stat buf;
- #ifdef _WIN32
-     if (stat(path, &buf)) {
-@@ -505,7 +505,7 @@
- 
- // returns zero on success, nonzero if didn't touch file
- //
--int boinc_touch_file(const char *path) {
-+int boinc_touch_file(const char *const path) {
- 
-     if (boinc_file_exists(path)) {
-         return 0;
-@@ -522,7 +522,7 @@
-     return -1;
- }
- 
--int boinc_copy(const char* orig, const char* newf) {
-+int boinc_copy(const char* const orig, const char* const newf) {
- #ifdef _WIN32
-     if (!CopyFileA(orig, newf, FALSE)) {     // FALSE means overwrite OK
-         return GetLastError();
-@@ -570,7 +570,7 @@
- #endif
- }
- 
--static int boinc_rename_aux(const char* old, const char* newf) {
-+static int boinc_rename_aux(const char* const old, const char* const newf) {
- #ifdef _WIN32
-     if (MoveFileExA(old, newf, MOVEFILE_REPLACE_EXISTING|MOVEFILE_WRITE_THROUGH)) return 0;
-     return GetLastError();
-@@ -581,7 +581,7 @@
- #endif
- }
- 
--int boinc_rename(const char* old, const char* newf) {
-+int boinc_rename(const char* const old, const char* const newf) {
-     int retval=0;
- 
-     retval = boinc_rename_aux(old, newf);
-@@ -598,7 +598,7 @@
- 
- // make a dir that's owner and group RWX
- //
--int boinc_mkdir(const char* path) {
-+int boinc_mkdir(const char* const path) {
-     if (is_dir(path)) return 0;
- #ifdef _WIN32
-     if (!CreateDirectoryA(path, NULL)) {
-@@ -613,7 +613,7 @@
-     return 0;
- }
- 
--int boinc_rmdir(const char* name) {
-+int boinc_rmdir(const char* const name) {
- #ifdef _WIN32
-     if (!RemoveDirectoryA(name)) {
-         return ERR_RMDIR;
-@@ -626,7 +626,7 @@
- }
- 
- #ifndef _WIN32
--int boinc_chown(const char* path, gid_t gid) {
-+int boinc_chown(const char* const path, const gid_t gid) {
-     if (gid) {
-         if (chown(path, (uid_t)-1, gid)) {
-             return ERR_CHOWN;
-@@ -639,7 +639,7 @@
- // if "filepath" is of the form a/b/c,
- // create directories dirpath/a, dirpath/a/b etc.
- //
--int boinc_make_dirs(const char* dirpath, const char* filepath) {
-+int boinc_make_dirs(const char* const dirpath, const char* const filepath) {
-     char buf[1024], oldpath[1024], newpath[1024];
-     int retval;
-     char *p, *q;
-@@ -676,7 +676,7 @@
- #endif
- }
- 
--int FILE_LOCK::lock(const char* filename) {
-+int FILE_LOCK::lock(const char* const filename) {
- #if defined(_WIN32) && !defined(__CYGWIN32__)
-     handle = CreateFileA(
-         filename, GENERIC_WRITE,
-@@ -706,7 +706,7 @@
-     return 0;
- }
- 
--int FILE_LOCK::unlock(const char* filename) {
-+int FILE_LOCK::unlock(const char* const filename) {
- #if defined(_WIN32) && !defined(__CYGWIN32__)
-     CloseHandle(handle);
- #else
-@@ -730,7 +730,7 @@
- #endif
- }
- 
--void relative_to_absolute(const char* relname, char* path) {
-+void relative_to_absolute(const char* const relname, char* path) {
-     boinc_getcwd(path);
-     if (strlen(relname)) {
-         strcat(path, "/");
-@@ -741,7 +741,7 @@
- // get total and free space on current filesystem (in bytes)
- //
- #ifdef _WIN32
--int get_filesystem_info(double &total_space, double &free_space, char*) {
-+int get_filesystem_info(double &total_space, double &free_space, const char* const) {
-     char buf[256];
-     boinc_getcwd(buf);
-     FreeFn pGetDiskFreeSpaceEx;
-@@ -774,7 +774,7 @@
-         total_space = (double)dwTotalClusters * dwSectPerClust * dwBytesPerSect;
-     }
- #else
--int get_filesystem_info(double &total_space, double &free_space, char* path) {
-+int get_filesystem_info(double &total_space, double &free_space, const char* const path) {
- #ifdef STATFS
-     struct STATFS fs_info;
- 
-@@ -795,7 +795,7 @@
- 
- #ifndef _WIN32
- 
--int get_file_dir(char* filename, char* dir) {
-+int get_file_dir(const char* const filename, char* const dir) {
-     char buf[8192], *p, path[256];
-     struct stat sbuf;
-     int retval;
-Index: boinc/lib/filesys.h
-===================================================================
---- boinc.orig/lib/filesys.h	2011-07-24 19:39:09.000000000 +0200
-+++ boinc/lib/filesys.h	2011-11-26 20:19:30.000000000 +0100
-@@ -43,26 +43,26 @@
- #ifdef __cplusplus
- extern "C" {
- #endif
--  extern int boinc_delete_file(const char*);
--  extern int boinc_touch_file(const char *path);
--  extern FILE* boinc_fopen(const char* path, const char* mode);
--  extern int boinc_copy(const char* orig, const char* newf);
--  extern int boinc_rename(const char* old, const char* newf);
--  extern int boinc_mkdir(const char*);
-+  extern int boinc_delete_file(const char* const);
-+  extern int boinc_touch_file(const char * const path);
-+  extern FILE* boinc_fopen(const char* const  path, const char* const  mode);
-+  extern int boinc_copy(const char* const  orig, const char* const  newf);
-+  extern int boinc_rename(const char* const  old, const char* const  newf);
-+  extern int boinc_mkdir(const char* const );
- #ifndef _WIN32
--  extern int boinc_chown(const char*, gid_t);
-+  extern int boinc_chown(const char* const , const  gid_t);
- #endif
--  extern int boinc_rmdir(const char*);
--  extern void boinc_getcwd(char*);
--  extern void relative_to_absolute(const char* relname, char* path);
--  extern int boinc_make_dirs(const char*, const char*);
-+  extern int boinc_rmdir(const char* const);
-+  extern void boinc_getcwd(char* const);
-+  extern void relative_to_absolute(const char* const relname, char* const path);
-+  extern int boinc_make_dirs(const char* const, const char* const);
-   extern char boinc_failed_file[256];
--  extern int is_file(const char* path);
--  extern int is_dir(const char* path);
--  extern int is_symlink(const char* path);
--  extern int boinc_truncate(const char*, double);
--  extern int boinc_file_exists(const char* path);
--  extern int boinc_file_or_symlink_exists(const char* path);
-+  extern int is_file(const char* const path);
-+  extern int is_dir(const char* const path);
-+  extern int is_symlink(const char* const path);
-+  extern int boinc_truncate(const char* const, const double);
-+  extern int boinc_file_exists(const char* const path);
-+  extern int boinc_file_or_symlink_exists(const char* const path);
- 
- #ifdef __cplusplus
- }
-@@ -71,10 +71,10 @@
- /* C++ specific prototypes/defines follow here */
- #ifdef __cplusplus
- 
--extern int file_size(const char*, double&);
--extern int clean_out_dir(const char*);
--extern int dir_size(const char* dirpath, double&, bool recurse=true);
--extern int get_filesystem_info(double& total, double& free, char* path=const_cast<char *>("."));
-+extern int file_size(const char* const, double&);
-+extern int clean_out_dir(const char* const);
-+extern int dir_size(const char* const dirpath, double&, const bool recurse=true);
-+extern int get_filesystem_info(double& total, double& free, char* const path=const_cast<char *>("."));
- 
- // TODO TODO TODO
- // remove this code - the DirScanner class does the same thing.
-@@ -91,12 +91,12 @@
- typedef DIR *DIRREF;
- #endif
- 
--extern DIRREF dir_open(const char*);
--extern int dir_scan(char*, DIRREF, int);
--extern int dir_scan(std::string&, DIRREF);
-+extern DIRREF dir_open(const char* const);
-+extern int dir_scan(const char* const, DIRREF, const int);
-+extern int dir_scan(const std::string&, DIRREF);
- extern void dir_close(DIRREF);
- 
--extern bool is_dir_empty(const char*);
-+extern bool is_dir_empty(const char* const);
- 
- class DirScanner {
- #if defined(_WIN32) && !defined(__CYGWIN32__)
-@@ -121,15 +121,15 @@
-     bool locked;
-     FILE_LOCK();
-     ~FILE_LOCK();
--    int lock(const char* filename);
--    int unlock(const char* filename);
-+    int lock(const char* const filename);
-+    int unlock(const char* const filename);
- };
- 
- #ifndef _WIN32
- 
- // search PATH, find the directory that a program is in, if any
- //
--extern int get_file_dir(char* filename, char* dir);
-+extern int get_file_dir(const char* const filename, char* const dir);
- 
- #endif
- 
-Index: boinc/lib/hostinfo.cpp
-===================================================================
---- boinc.orig/lib/hostinfo.cpp	2011-10-08 14:11:56.000000000 +0200
-+++ boinc/lib/hostinfo.cpp	2011-11-26 20:08:30.000000000 +0100
-@@ -29,6 +29,7 @@
- #if HAVE_UNISTD_H
- #include <unistd.h>
- #endif
-+#include <assert.h>
- #endif
- 
- #include "util.h"
-@@ -71,7 +72,7 @@
-     strcpy(virtualbox_version, "");
- }
- 
--int HOST_INFO::parse(XML_PARSER& xp, bool benchmarks_only) {
-+int HOST_INFO::parse(XML_PARSER& xp, const bool benchmarks_only) {
-     char buf[1024];
- 
-     MIOFILE& in = *(xp.f);
-@@ -128,7 +129,7 @@
- // - app init file (net info, coprocs)
- //
- int HOST_INFO::write(
--    MIOFILE& out, bool include_net_info, bool include_coprocs
-+    MIOFILE& out, const bool include_net_info, const bool include_coprocs
- ) {
-     char pv[265], pm[256], pf[256], osn[256], osv[256];
-     out.printf(
-@@ -204,11 +205,14 @@
- // which communicates its result via a file.
- // The following functions read and write this file.
- //
--int HOST_INFO::parse_cpu_benchmarks(FILE* in) {
-+int HOST_INFO::parse_cpu_benchmarks(FILE* const in) {
-+
-+    assert(in);
-+
-     char buf[256];
- 
-     char* p = fgets(buf, 256, in);
--    if (!p) return 0;           // Fixes compiler warning
-+    if (!p) return -1;           // Fixes compiler warning
-     while (fgets(buf, 256, in)) {
-         if (match_tag(buf, "<cpu_benchmarks>"));
-         else if (match_tag(buf, "</cpu_benchmarks>")) return 0;
-@@ -221,7 +225,10 @@
-     return 0;
- }
- 
--int HOST_INFO::write_cpu_benchmarks(FILE* out) {
-+int HOST_INFO::write_cpu_benchmarks(FILE* const out) {
-+
-+    assert(out);
-+
-     fprintf(out,
-         "<cpu_benchmarks>\n"
-         "    <p_fpops>%f</p_fpops>\n"
-Index: boinc/lib/hostinfo.h
-===================================================================
---- boinc.orig/lib/hostinfo.h	2011-10-30 00:27:06.000000000 +0200
-+++ boinc/lib/hostinfo.h	2011-11-26 20:09:06.000000000 +0100
-@@ -70,8 +70,8 @@
-     HOST_INFO();
-     int parse(XML_PARSER&, bool benchmarks_only = false);
-     int write(MIOFILE&, bool include_net_info, bool include_coprocs);
--    int parse_cpu_benchmarks(FILE*);
--    int write_cpu_benchmarks(FILE*);
-+    int parse_cpu_benchmarks(FILE* const);
-+    int write_cpu_benchmarks(FILE* const);
-     void print();
- 
-     bool host_is_running_on_batteries();
-Index: boinc/lib/run_app_windows.cpp
-===================================================================
---- boinc.orig/lib/run_app_windows.cpp	2011-10-08 14:11:57.000000000 +0200
-+++ boinc/lib/run_app_windows.cpp	2011-11-26 19:34:30.000000000 +0100
-@@ -179,7 +179,7 @@
- 
- 
- int run_app_windows(
--    const char* dir, const char* file, int argc, char *const argv[], HANDLE& id
-+    const char* const dir, const char* const file, int argc, char *const argv[], HANDLE& id
- ) {
-     int retval;
-     PROCESS_INFORMATION process_info;
-Index: boinc/lib/run_app_windows.h
-===================================================================
---- boinc.orig/lib/run_app_windows.h	2011-10-08 14:11:57.000000000 +0200
-+++ boinc/lib/run_app_windows.h	2011-11-26 19:34:43.000000000 +0100
-@@ -22,5 +22,5 @@
- extern void get_sandbox_account_service_token();
- 
- extern int run_app_windows(
--    const char* path, const char* cdir, int argc, char *const argv[], HANDLE&
-+    const char* const path, const char* const cdir, int argc, char *const argv[], HANDLE&
- );
-Index: boinc/lib/unix_util.cpp
-===================================================================
---- boinc.orig/lib/unix_util.cpp	2011-10-30 00:27:06.000000000 +0200
-+++ boinc/lib/unix_util.cpp	2011-11-26 20:02:19.000000000 +0100
-@@ -31,7 +31,7 @@
- // In theory setenv() is posix, but some implementations of unix
- // don't have it.  The implementation isn't trivial because of
- // differences in how putenv() behaves on different systems.
--int setenv(const char *name, const char *value, int overwrite) {
-+int setenv(const char *const name, const char *const value, const int overwrite) {
-     char *buf;
-     int rv;
-     // Name can't contant an equal sign.
-@@ -95,7 +95,7 @@
- 
- static FILE *stderr_null, *stdout_null;
- 
--int daemon(int nochdir, int noclose) {
-+int daemon(const int nochdir, const int noclose) {
-     pid_t childpid,sessionid;
-     if (!nochdir) {
-         chdir("/");
-Index: boinc/lib/unix_util.h
-===================================================================
---- boinc.orig/lib/unix_util.h	2011-10-30 00:27:06.000000000 +0200
-+++ boinc/lib/unix_util.h	2011-11-26 20:03:12.000000000 +0100
-@@ -26,13 +26,13 @@
- // Notice that this has an ifndef around it.  If it is causing you problem,
- // then try defining HAVE_SETENV in your configuration file.
- #ifndef HAVE_SETENV
--extern "C" int setenv(const char *name, const char *value, int overwrite);
-+extern "C" int setenv(const char *const name, const char *const value, const int overwrite);
- #endif
- 
- // Notice that this has an ifndef around it.  If it is causing you problem,
- // then try defining HAVE_DAEMON in your configuration file.
- #ifndef HAVE_DAEMON
--extern "C" int daemon(int nochdir, int noclose);
-+extern "C" int daemon(const int nochdir, const int noclose);
- #endif /* HAVE_DAEMON */
- 
- // Notice that this has an ifndef around it.  If it is causing you problem,
-Index: boinc/lib/util.cpp
-===================================================================
---- boinc.orig/lib/util.cpp	2011-10-30 00:27:06.000000000 +0200
-+++ boinc/lib/util.cpp	2011-11-26 19:59:03.000000000 +0100
-@@ -112,7 +112,8 @@
- 
- // sleep for a specified number of seconds
- //
--void boinc_sleep(double seconds) {
-+void boinc_sleep(const double& time_to_sleep) {
-+    double seconds = time_to_sleep;
- #ifdef _WIN32
-     ::Sleep((int)(1000*seconds));
- #else
-@@ -132,7 +133,7 @@
- #endif
- }
- 
--void push_unique(string s, vector<string>& v) {
-+void push_unique(const string& s, vector<string>& v) {
-     for (unsigned int i=0; i<v.size();i++) {
-         if (s == v[i]) return;
-     }
-@@ -234,11 +235,11 @@
- // html/inc/credit.inc
- //
- void update_average(
--    double now,
--    double work_start_time,       // when new work was started
-+    const double now,
-+    const double work_start_time,   // when new work was started
-                                     // (or zero if no new work)
--    double work,                    // amount of new work
--    double half_life,
-+    const double work,              // amount of new work
-+    const double half_life,
-     double& avg,                    // average work per day (in and out)
-     double& avg_time                // when average was last computed
- ) {
-@@ -289,7 +290,7 @@
- #ifndef _WIN32
- // (linux) return current CPU time of the given process
- //
--double linux_cpu_time(int pid) {
-+double linux_cpu_time(const int pid) {
-     FILE *file;
-     char file_name[24];
-     unsigned long utime = 0, stime = 0;
-@@ -316,7 +317,7 @@
- 
- // read file (at most max_len chars, if nonzero) into malloc'd buf
- //
--int read_file_malloc(const char* path, char*& buf, size_t max_len, bool tail) {
-+int read_file_malloc(const char* const path, char*& buf, const size_t max_len, const bool tail) {
-     int retval;
-     double size;
- 
-@@ -355,7 +356,7 @@
- // read file (at most max_len chars, if nonzero) into string
- //
- int read_file_string(
--    const char* path, string& result, size_t max_len, bool tail
-+    const char* const path, string& result, const size_t max_len, const bool tail
- ) {
-     result.erase();
-     int retval;
-@@ -376,7 +377,7 @@
- 
- #ifdef _WIN32
- int run_program(
--    const char* dir, const char* file, int argc, char *const argv[], double nsecs, HANDLE& id
-+    const char* const dir, const char* const file, int argc, char *const argv[], const double nsecs, HANDLE& id
- ) {
-     int retval;
-     PROCESS_INFORMATION process_info;
-@@ -428,7 +429,7 @@
- }
- #else
- int run_program(
--    const char* dir, const char* file, int , char *const argv[], double nsecs, int& id
-+    const char* const dir, const char* const file, const int , char *const argv[], const double nsecs, int& id
- ) {
-     int retval;
-     int pid = fork();
-@@ -486,7 +487,7 @@
- }
- 
- #else
--int get_exit_status(int pid) {
-+int get_exit_status(const int pid) {
-     int status;
-     waitpid(pid, &status, 0);
-     return status;
-@@ -500,7 +501,7 @@
- #endif
- 
- #ifdef _WIN32
--static int get_client_mutex(const char*) {
-+static int get_client_mutex(const char* const) {
-     char buf[MAX_PATH] = "";
-     
-     // Global mutex on Win2k and later
-@@ -515,7 +516,7 @@
-         return ERR_ALREADY_RUNNING;
-     }
- #else
--static int get_client_mutex(const char* dir) {
-+static int get_client_mutex(const char* const dir) {
-     char path[1024];
-     static FILE_LOCK file_lock;
- 
-@@ -530,7 +531,7 @@
-     return 0;
- }
- 
--int wait_client_mutex(const char* dir, double timeout) {
-+int wait_client_mutex(const char* const dir, const double timeout) {
-     double start = dtime();
-     int retval = 0;
-     while (1) {
-@@ -542,7 +543,7 @@
-     return retval;
- }
- 
--bool boinc_is_finite(double x) {
-+bool boinc_is_finite(const double x) {
- #if defined (HPUX_SOURCE)
-     return _Isfinite(x);
-     return false;
-Index: boinc/lib/util.h
-===================================================================
---- boinc.orig/lib/util.h	2011-10-30 00:27:06.000000000 +0200
-+++ boinc/lib/util.h	2011-11-26 19:59:15.000000000 +0100
-@@ -29,8 +29,8 @@
- 
- extern double dtime();
- extern double dday();
--extern void boinc_sleep(double);
--extern void push_unique(std::string, std::vector<std::string>&);
-+extern void boinc_sleep(const double& seconds);
-+extern void push_unique(const std::string&, std::vector<std::string>&);
- 
- // NOTE: use #include <functional>   to get max,min
- 
-@@ -47,7 +47,7 @@
- #ifdef _WIN32
- #include <windows.h>
- 
--extern char* windows_error_string(char* pszBuf, int iSize);
-+extern char* windows_error_string(char* pszBuf, const int iSize);
- extern char* windows_format_error_string(
-     unsigned long dwError, char* pszBuf, int iSize
- );
-@@ -59,10 +59,10 @@
- //
- static const int PROCESS_IDLE_PRIORITY = 19;
- static const int PROCESS_MEDIUM_PRIORITY = 10;
--extern double linux_cpu_time(int pid);
-+extern double linux_cpu_time(const int pid);
- #endif
- 
--extern void update_average(double, double, double, double, double&, double&);
-+extern void update_average(const double, const double, const double, const double, double&, double&);
- 
- extern int boinc_calling_thread_cpu_time(double&);
- 
-@@ -74,16 +74,16 @@
- // Use only for non-binary files; returns null-terminated string.
- //
- extern int read_file_malloc(
--    const char* path, char*& result, size_t max_len=0, bool tail=false
-+    const char* const path, char*& result, const size_t max_len=0, const bool tail=false
- );
- extern int read_file_string(
--    const char* path, std::string& result, size_t max_len=0, bool tail=false
-+    const char* const path, std::string& result, const size_t max_len=0, const bool tail=false
- );
- 
- #ifdef _WIN32
- 
- extern int run_program(
--    const char* dir, const char* file, int argc, char *const argv[], double, HANDLE&
-+    const char* const dir, const char* const file, int argc, char *const argv[], const double, HANDLE&
- );
- 
- extern void kill_program(HANDLE);
-@@ -92,14 +92,14 @@
- 
- #else
- extern int run_program(
--    const char* dir, const char* file, int argc, char *const argv[], double, int&
-+    const char* const dir, const char* const file, int argc, char *const argv[], const double, int&
- );
--extern void kill_program(int);
--extern int get_exit_status(int);
--extern bool process_exists(int);
-+extern void kill_program(const int);
-+extern int get_exit_status(const int);
-+extern bool process_exists(const int);
- #endif
- 
--extern int wait_client_mutex(const char* dir, double timeout);
-+extern int wait_client_mutex(const char* const dir, const double timeout);
- 
- #ifdef GCL_SIMULATOR
- extern double simtime;
diff --git a/debian/patches/annoying_warning_const_image.patch b/debian/patches/annoying_warning_const_image.patch
deleted file mode 100644
index 1426267..0000000
--- a/debian/patches/annoying_warning_const_image.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Author: Steffen Moeller <moeller at debian.org>
-Description: Adding now truly missing const flags to icons.
-
-Index: boinc/clientgui/res/linuxicon.xpm
-===================================================================
---- boinc.orig/clientgui/res/linuxicon.xpm	2011-07-24 19:39:09.000000000 +0200
-+++ boinc/clientgui/res/linuxicon.xpm	2011-11-13 19:53:15.000000000 +0100
-@@ -1,5 +1,5 @@
- /* XPM */
--static char *Linux_xpm[] = {
-+static const char *Linux_xpm[] = {
- /* columns rows colors chars-per-pixel */
- "14 14 17 1",
- ". c #8F8979",
-Index: boinc/clientgui/res/macosicon.xpm
-===================================================================
---- boinc.orig/clientgui/res/macosicon.xpm	2011-07-24 19:39:09.000000000 +0200
-+++ boinc/clientgui/res/macosicon.xpm	2011-11-13 19:54:13.000000000 +0100
-@@ -1,5 +1,5 @@
- /* XPM */
--static char *MacOS_xpm[] = {
-+static const char *MacOS_xpm[] = {
- /* columns rows colors chars-per-pixel */
- "14 14 14 1",
- "= c #295A9C",
-Index: boinc/clientgui/res/windowsicon.xpm
-===================================================================
---- boinc.orig/clientgui/res/windowsicon.xpm	2011-07-24 19:39:09.000000000 +0200
-+++ boinc/clientgui/res/windowsicon.xpm	2011-11-13 19:56:04.000000000 +0100
-@@ -1,5 +1,5 @@
- /* XPM */
--static char *Win32_xpm[] = {
-+static const char *Win32_xpm[] = {
- /* columns rows colors chars-per-pixel */
- "14 14 23 1",
- "4 c #6CC0EE",
diff --git a/debian/patches/evenMoreConst03.patch b/debian/patches/evenMoreConst03.patch
deleted file mode 100644
index 454286f..0000000
--- a/debian/patches/evenMoreConst03.patch
+++ /dev/null
@@ -1,336 +0,0 @@
-Index: boinc/lib/str_replace.h
-===================================================================
---- boinc.orig/lib/str_replace.h	2011-11-26 16:11:07.000000000 +0100
-+++ boinc/lib/str_replace.h	2011-11-26 16:11:32.000000000 +0100
-@@ -25,19 +25,19 @@
- #endif
- 
- #if !HAVE_STRLCPY
--extern size_t strlcpy(char*, const char*, size_t);
-+extern size_t strlcpy(char* const, const char* const, const size_t);
- #endif
- 
- #if !HAVE_STRLCAT
--extern size_t strlcat(char *dst, const char *src, size_t size);
-+extern size_t strlcat(char *const dst, const char *const src, const size_t size);
- #endif
- 
- #if !HAVE_STRCASESTR
--extern const char *strcasestr(const char *s1, const char *s2);
-+extern const char *strcasestr(const char *const s1, const char *const s2);
- #endif
- 
- #if !HAVE_STRCASECMP
--inline int strcasecmp(const char* s1, const char* s2) {
-+inline int strcasecmp(const char* const s1, const char* const s2) {
-     while (*s1 && *s2) {
-         char c1 = tolower(*s1++);
-         char c2 = tolower(*s2++);
-Index: boinc/lib/str_util.cpp
-===================================================================
---- boinc.orig/lib/str_util.cpp	2011-11-26 16:11:07.000000000 +0100
-+++ boinc/lib/str_util.cpp	2011-11-26 16:11:32.000000000 +0100
-@@ -53,7 +53,7 @@
- // see http://www.gratisoft.us/todd/papers/strlcpy.html
- //
- #if !HAVE_STRLCPY
--size_t strlcpy(char *dst, const char *src, size_t size) {
-+size_t strlcpy(char *const dst, const char *const src, const size_t size) {
-     size_t ret = strlen(src);
- 
-     if (size) {
-@@ -67,7 +67,7 @@
- #endif
- 
- #if !HAVE_STRLCAT
--size_t strlcat(char *dst, const char *src, size_t size) {
-+size_t strlcat(char *const dst, const char *const src, const size_t size) {
-     size_t dst_len = strlen(dst);
-     size_t src_len = strlen(src);
- 
-@@ -82,7 +82,7 @@
- #endif // !HAVE_STRLCAT
- 
- #if !HAVE_STRCASESTR
--const char *strcasestr(const char *s1, const char *s2) {
-+const char *strcasestr(const char *const s1, const char *const s2) {
-     char *needle=NULL, *haystack=NULL, *p=NULL;
-     bool need_free = false;
-     // Is alloca() really less likely to fail with out of memory error
-@@ -152,7 +152,7 @@
- // unit of time division used
- // smallest_timescale: 0=seconds, 1=minutes, 2=hours, 3=days, 4=years
- //
--int ndays_to_string (double x, int smallest_timescale, char *buf) {
-+int ndays_to_string (const double x, const int smallest_timescale, char *const buf) {
-     double years, days, hours, minutes, seconds;
-     char year_buf[64], day_buf[16], hour_buf[16], min_buf[16], sec_buf[16];
- 
-@@ -214,7 +214,7 @@
- // Convert nbytes into a string.  If total_bytes is non-zero,
- // convert the two into a fractional display (i.e. 4/16 KB)
- //
--void nbytes_to_string(double nbytes, double total_bytes, char* str, int len) {
-+void nbytes_to_string(const double nbytes, const double total_bytes, char* const str, int const len) {
-     char buf[256];
-     double xTera = (1024.0*1024.0*1024.0*1024.0);
-     double xGiga = (1024.0*1024.0*1024.0);
-@@ -311,7 +311,7 @@
- 
- // remove whitespace from start and end of a string
- //
--void strip_whitespace(char *str) {
-+void strip_whitespace(char *const str) {
-     int n;
-     while (1) {
-         if (!str[0]) break;
-@@ -345,7 +345,7 @@
-     }
- }
- 
--char* time_to_string(double t) {
-+char* time_to_string(const double t) {
-     static char buf[100];
-     time_t x = (time_t)t;
-     struct tm* tm = localtime(&x);
-@@ -372,7 +372,7 @@
-     return buf;
- }
- 
--string timediff_format(double diff) {
-+string timediff_format(const double diff) {
-     char buf[256];
-     int tdiff = (int)diff;
- 
-@@ -408,7 +408,7 @@
-     return buf;
- }
- 
--void mysql_timestamp(double dt, char* p) {
-+void mysql_timestamp(const double dt, char* const p) {
-     struct tm* tmp;
-     time_t t = (time_t)dt;
-     tmp = localtime(&t);     // MySQL timestamps are in local time
-@@ -421,7 +421,7 @@
- // Return a text-string description of a given error.
- // Must be kept consistent with error_numbers.h
- //
--const char* boincerror(int which_error) {
-+const char* boincerror(const int which_error) {
-     switch (which_error) {
-         case BOINC_SUCCESS: return "Success";
-         case ERR_SELECT: return "select() failed";
-@@ -562,7 +562,7 @@
-     return buf;
- }
- 
--const char* network_status_string(int n) {
-+const char* network_status_string(const int n) {
- 	switch (n) {
- 	case NETWORK_STATUS_ONLINE: return "online";
- 	case NETWORK_STATUS_WANT_CONNECTION: return "need connection";
-@@ -572,7 +572,7 @@
- 	}
- }
- 
--const char* rpc_reason_string(int reason) {
-+const char* rpc_reason_string(const int reason) {
-     switch (reason) {
-     case RPC_REASON_USER_REQ: return "Requested by user";
-     case RPC_REASON_NEED_WORK: return "To fetch work";
-@@ -585,7 +585,7 @@
-     }
- }
- 
--const char* suspend_reason_string(int reason) {
-+const char* suspend_reason_string(const int reason) {
-     switch (reason) {
-     case SUSPEND_REASON_BATTERIES: return "on batteries";
-     case SUSPEND_REASON_USER_ACTIVE: return "computer is in use";
-@@ -603,7 +603,7 @@
-     return "unknown reason";
- }
- 
--const char* run_mode_string(int mode) {
-+const char* run_mode_string(const int mode) {
-     switch (mode) {
-     case RUN_MODE_ALWAYS: return "always";
-     case RUN_MODE_AUTO: return "according to prefs";
-@@ -691,8 +691,8 @@
- // target is string to replace with
- //
- int string_substitute(
--    const char* haystack, char* out, int out_len,
--    const char* needle, const char* target
-+    const char* const haystack, char* const out, const int out_len,
-+    const char* const needle, const char* const target
- ) {
-     int i=0, j=0;
-     int needle_len = (int)strlen(needle);
-@@ -716,7 +716,7 @@
-     return retval;
- }
- 
--inline void remove_str(char* p, const char* str) {
-+inline void remove_str(char* p, const char* const str) {
-     size_t n = strlen(str);
-     while (1) {
-         p = strstr(p, str);
-@@ -727,7 +727,7 @@
- 
- // remove _( and ") from string
- //
--void strip_translation(char* p) {
-+void strip_translation(char* const p) {
-     remove_str(p, "_(\"");
-     remove_str(p, "\")");
- }
-Index: boinc/lib/str_util.h
-===================================================================
---- boinc.orig/lib/str_util.h	2011-11-26 16:11:07.000000000 +0100
-+++ boinc/lib/str_util.h	2011-11-26 16:11:32.000000000 +0100
-@@ -26,17 +26,17 @@
- #include <vector>
- 
- extern void strcpy_overlap(char*, const char*);
--extern int ndays_to_string(double x, int smallest_timescale, char *buf);
--extern void nbytes_to_string(double nbytes, double total_bytes, char* str, int len);
-+extern int ndays_to_string(const double x, const int smallest_timescale, char *const buf);
-+extern void nbytes_to_string(const double nbytes, const double total_bytes, char* const str, const int len);
- extern int parse_command_line(char*, char**);
- extern void c2x(char *what);
- extern void strip_whitespace(char *str);
- extern void strip_whitespace(std::string&);
- #define safe_strcpy(x, y) strlcpy(x, y, sizeof(x))
- #define safe_strcat(x, y) if (strlen(x)+strlen(y)<sizeof(x)) strcat(x, y)
--extern char* time_to_string(double);
-+extern char* time_to_string(const double);
- extern char* precision_time_to_string(double);
--extern std::string timediff_format(double);
-+extern std::string timediff_format(const double);
- 
- inline bool ends_with(std::string const& s, std::string const& suffix) {
-     return
-@@ -62,13 +62,13 @@
- }
- 
- extern int string_substitute(
--    const char* haystack, char* out, int out_len,
--    const char* needle, const char* target
-+    const char* haystack, char* const out, const int out_len,
-+    const char* needle, const char* const target
- );
- 
- // convert UNIX time to MySQL timestamp (yyyymmddhhmmss)
- //
--extern void mysql_timestamp(double, char*);
-+extern void mysql_timestamp(const double, char* const);
- 
- extern const char* network_status_string(int);
- extern const char* rpc_reason_string(int);
-Index: boinc/lib/proc_control.cpp
-===================================================================
---- boinc.orig/lib/proc_control.cpp	2011-10-30 00:27:06.000000000 +0200
-+++ boinc/lib/proc_control.cpp	2011-11-26 16:30:40.000000000 +0100
-@@ -45,7 +45,7 @@
- 
- using std::vector;
- 
--static void get_descendants_aux(PROC_MAP& pm, int pid, vector<int>& pids) {
-+static void get_descendants_aux(PROC_MAP& pm , const int pid, vector<int>& pids) {
-     PROC_MAP::iterator i = pm.find(pid);
-     if (i == pm.end()) return;
-     PROCINFO& p = i->second;
-@@ -60,7 +60,7 @@
- 
- // return a list of all descendants of the given process
- //
--void get_descendants(int pid, vector<int>& pids) {
-+void get_descendants(const int pid, vector<int>& pids) {
-     int retval;
-     PROC_MAP pm;
-     pids.clear();
-@@ -85,7 +85,7 @@
- //
- 
- int suspend_or_resume_threads(
--    DWORD pid, DWORD calling_thread_id, bool resume
-+    const DWORD pid, const DWORD calling_thread_id, const bool resume
- ) { 
-     HANDLE threads, thread;
-     static HMODULE hKernel32Lib = NULL;
-@@ -168,7 +168,7 @@
- #else
- // Same, but if child_pid is nonzero, give it a chance to exit gracefully on Unix
- //
--void kill_descendants(int child_pid) {
-+void kill_descendants(const int child_pid) {
-     vector<int> descendants;
-     // on Unix, ask main process nicely.
-     // it descendants still exist after 10 sec, use the nuclear option
-@@ -191,7 +191,7 @@
- }
- #endif
- 
--void suspend_or_resume_all(vector<int>& pids, bool resume) {
-+void suspend_or_resume_all(vector<int>& pids, const bool resume) {
-     for (unsigned int i=0; i<pids.size(); i++) {
- #ifdef _WIN32
-         suspend_or_resume_threads(pids[i], 0, resume);
-@@ -206,7 +206,7 @@
- // suspend/resume the descendants of the given process
- // (or if pid==0, the calling process)
- //
--void suspend_or_resume_descendants(int pid, bool resume) {
-+void suspend_or_resume_descendants(int pid, const bool resume) {
-     vector<int> descendants;
-     if (!pid) {
- #ifdef _WIN32
-@@ -219,7 +219,7 @@
-     suspend_or_resume_all(descendants, resume);
- }
- 
--void suspend_or_resume_process(int pid, bool resume) {
-+void suspend_or_resume_process(const int pid, const bool resume) {
- #ifdef _WIN32
-     suspend_or_resume_threads(pid, 0, resume);
- #else
-Index: boinc/lib/proc_control.h
-===================================================================
---- boinc.orig/lib/proc_control.h	2011-10-30 00:27:06.000000000 +0200
-+++ boinc/lib/proc_control.h	2011-11-26 16:31:30.000000000 +0100
-@@ -23,16 +23,16 @@
- #include <windows.h>
- #endif
- 
--extern void get_descendants(int pid, std::vector<int>& pids);
-+extern void get_descendants(const int pid, std::vector<int>& pids);
- extern bool any_process_exists(std::vector<int>& pids);
- extern void kill_all(std::vector<int>& pids);
- #ifdef _WIN32
- extern void kill_descendants();
--extern int suspend_or_resume_threads(DWORD pid, DWORD threadid, bool resume);
-+extern int suspend_or_resume_threads(const DWORD pid, const DWORD threadid, const bool resume);
- #else
--extern void kill_descendants(int child_pid=0);
-+extern void kill_descendants(const int child_pid=0);
- #endif
--extern void suspend_or_resume_descendants(int pid, bool resume);
--extern void suspend_or_resume_process(int pid, bool resume);
-+extern void suspend_or_resume_descendants(int pid, const bool resume);
-+extern void suspend_or_resume_process(const int pid, const bool resume);
- 
- #endif
-Index: boinc/lib/procinfo.cpp
-===================================================================
---- boinc.orig/lib/procinfo.cpp	2011-10-08 14:11:56.000000000 +0200
-+++ boinc/lib/procinfo.cpp	2011-11-26 16:22:39.000000000 +0100
-@@ -64,7 +64,7 @@
-     }
- }
- 
--static inline bool in_vector(int n, vector<int>& v) {
-+static inline bool in_vector(const int n, const vector<int>& v) {
-     for (unsigned int i=0; i<v.size(); i++) {
-         if (n == v[i]) return true;
-     }
diff --git a/debian/patches/series b/debian/patches/series
index 28a2f64..c906b07 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,10 +10,6 @@ upstream_sztaki_configureEval.patch
 generate_less.patch
 possible_size_type_error.patch
 debian_debian_AdjustBoincTopdirPython.patch
-#AddSomeConstToMakeClearMemoryIsNotAllocated.patch
-#AddingMoreConst.patch
-#evenMoreConst03.patch
-#andYetMorePatches04.patch
 #convinceDavid#cwd_handling.patch
 # --- A
 #convinceDavid# bug672328  MoreInformativeAppStartFailure.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-boinc/boinc.git



More information about the pkg-boinc-commits mailing list